diff options
419 files changed, 12424 insertions, 12545 deletions
diff --git a/.vscode/settings.json b/.vscode/settings.json index 8a292c0be..ca242662b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | { | 1 | { |
| 2 | "rust-analyzer.assist.importMergeBehavior": "last", | 2 | "rust-analyzer.assist.importMergeBehavior": "last", |
| 3 | "editor.formatOnSave": true, | 3 | "editor.formatOnSave": true, |
| 4 | "rust-analyzer.cargo.allFeatures": false, | ||
| 5 | "rust-analyzer.checkOnSave.allFeatures": false, | 4 | "rust-analyzer.checkOnSave.allFeatures": false, |
| 6 | "rust-analyzer.checkOnSave.allTargets": false, | 5 | "rust-analyzer.checkOnSave.allTargets": false, |
| 7 | "rust-analyzer.cargo.target": "thumbv7em-none-eabi", | 6 | "rust-analyzer.cargo.target": "thumbv7em-none-eabi", |
diff --git a/embassy-stm32-examples/Cargo.toml b/embassy-stm32-examples/Cargo.toml index ab6fc6c14..8d1361cf8 100644 --- a/embassy-stm32-examples/Cargo.toml +++ b/embassy-stm32-examples/Cargo.toml | |||
| @@ -28,6 +28,7 @@ defmt-rtt = "0.2.0" | |||
| 28 | cortex-m = "0.7.1" | 28 | cortex-m = "0.7.1" |
| 29 | cortex-m-rt = "0.6.13" | 29 | cortex-m-rt = "0.6.13" |
| 30 | embedded-hal = { version = "0.2.4" } | 30 | embedded-hal = { version = "0.2.4" } |
| 31 | panic-probe = "0.1.0" | 31 | panic-probe = { version = "0.2.0", features= ["print-defmt"] } |
| 32 | futures = { version = "0.3.8", default-features = false, features = ["async-await"] } | 32 | futures = { version = "0.3.8", default-features = false, features = ["async-await"] } |
| 33 | rtt-target = { version = "0.3", features = ["cortex-m"] } | 33 | rtt-target = { version = "0.3", features = ["cortex-m"] } |
| 34 | heapless = "0.7" \ No newline at end of file | ||
diff --git a/embassy-stm32-examples/src/bin/can.rs_ b/embassy-stm32-examples/src/bin/can.rs_ deleted file mode 100644 index 72272212e..000000000 --- a/embassy-stm32-examples/src/bin/can.rs_ +++ /dev/null | |||
| @@ -1,57 +0,0 @@ | |||
| 1 | #![no_std] | ||
| 2 | #![no_main] | ||
| 3 | #![feature(trait_alias)] | ||
| 4 | #![feature(type_alias_impl_trait)] | ||
| 5 | #![feature(min_type_alias_impl_trait)] | ||
| 6 | #![feature(impl_trait_in_bindings)] | ||
| 7 | |||
| 8 | #[path = "../example_common.rs"] | ||
| 9 | mod example_common; | ||
| 10 | use example_common::{panic, *}; | ||
| 11 | |||
| 12 | use bxcan::filter::Mask32; | ||
| 13 | use cortex_m_rt::entry; | ||
| 14 | use embassy::executor::Executor; | ||
| 15 | use embassy::util::Forever; | ||
| 16 | use embassy_stm32::hal::prelude::*; | ||
| 17 | use embassy_stm32::hal::{can::Can, stm32}; | ||
| 18 | use embassy_stm32::{can, interrupt}; | ||
| 19 | |||
| 20 | #[embassy::task] | ||
| 21 | async fn run(dp: stm32::Peripherals, _cp: cortex_m::Peripherals) { | ||
| 22 | let gpioa = dp.GPIOA.split(); | ||
| 23 | |||
| 24 | let rx = gpioa.pa11.into_alternate_af9(); | ||
| 25 | let tx = gpioa.pa12.into_alternate_af9(); | ||
| 26 | let mut can = bxcan::Can::new(Can::new(dp.CAN1, (tx, rx))); | ||
| 27 | |||
| 28 | // APB1 (PCLK1): 24MHz, Bit rate: 20kBit/s, Sample Point 87.5% | ||
| 29 | // Value was calculated with http://www.bittiming.can-wiki.info/ | ||
| 30 | can.modify_config().set_bit_timing(0x001c_004a); | ||
| 31 | // Configure filters so that can frames can be received. | ||
| 32 | can.modify_filters().enable_bank(0, Mask32::accept_all()); | ||
| 33 | |||
| 34 | let mut can = can::Can::new(can, interrupt::take!(CAN1_TX), interrupt::take!(CAN1_RX0)); | ||
| 35 | |||
| 36 | let _frame = can.receive().await; | ||
| 37 | } | ||
| 38 | |||
| 39 | static EXECUTOR: Forever<Executor> = Forever::new(); | ||
| 40 | |||
| 41 | #[entry] | ||
| 42 | fn main() -> ! { | ||
| 43 | let dp = stm32::Peripherals::take().unwrap(); | ||
| 44 | let cp = cortex_m::peripheral::Peripherals::take().unwrap(); | ||
| 45 | |||
| 46 | dp.DBGMCU.cr.modify(|_, w| { | ||
| 47 | w.dbg_sleep().set_bit(); | ||
| 48 | w.dbg_standby().set_bit(); | ||
| 49 | w.dbg_stop().set_bit() | ||
| 50 | }); | ||
| 51 | dp.RCC.ahb1enr.modify(|_, w| w.dma1en().enabled()); | ||
| 52 | |||
| 53 | let executor = EXECUTOR.put(Executor::new()); | ||
| 54 | executor.run(|spawner| { | ||
| 55 | unwrap!(spawner.spawn(run(dp, cp))); | ||
| 56 | }); | ||
| 57 | } | ||
diff --git a/embassy-stm32-examples/src/bin/exti.rs_ b/embassy-stm32-examples/src/bin/exti.rs_ deleted file mode 100644 index e13b23bac..000000000 --- a/embassy-stm32-examples/src/bin/exti.rs_ +++ /dev/null | |||
| @@ -1,57 +0,0 @@ | |||
| 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 | use example_common::{panic, *}; | ||
| 11 | |||
| 12 | use cortex_m_rt::entry; | ||
| 13 | use embassy::executor::Executor; | ||
| 14 | use embassy::traits::gpio::*; | ||
| 15 | use embassy::util::Forever; | ||
| 16 | use embassy_stm32::exti::ExtiPin; | ||
| 17 | use embassy_stm32::hal::prelude::*; | ||
| 18 | use embassy_stm32::interrupt; | ||
| 19 | use embassy_stm32::pac as stm32; | ||
| 20 | use futures::pin_mut; | ||
| 21 | |||
| 22 | #[embassy::task] | ||
| 23 | async fn run(dp: stm32::Peripherals, _cp: cortex_m::Peripherals) { | ||
| 24 | let gpioa = dp.GPIOA.split(); | ||
| 25 | |||
| 26 | let button = gpioa.pa0.into_pull_up_input(); | ||
| 27 | let mut syscfg = dp.SYSCFG.constrain(); | ||
| 28 | |||
| 29 | let mut pin = ExtiPin::new(button, interrupt::take!(EXTI0), &mut syscfg); | ||
| 30 | |||
| 31 | info!("Starting loop"); | ||
| 32 | |||
| 33 | loop { | ||
| 34 | pin.wait_for_rising_edge().await; | ||
| 35 | info!("edge detected!"); | ||
| 36 | } | ||
| 37 | } | ||
| 38 | |||
| 39 | static EXECUTOR: Forever<Executor> = Forever::new(); | ||
| 40 | |||
| 41 | #[entry] | ||
| 42 | fn main() -> ! { | ||
| 43 | let dp = stm32::Peripherals::take().unwrap(); | ||
| 44 | let cp = cortex_m::peripheral::Peripherals::take().unwrap(); | ||
| 45 | |||
| 46 | dp.DBGMCU.cr.modify(|_, w| { | ||
| 47 | w.dbg_sleep().set_bit(); | ||
| 48 | w.dbg_standby().set_bit(); | ||
| 49 | w.dbg_stop().set_bit() | ||
| 50 | }); | ||
| 51 | dp.RCC.ahb1enr.modify(|_, w| w.dma1en().enabled()); | ||
| 52 | |||
| 53 | let executor = EXECUTOR.put(Executor::new()); | ||
| 54 | executor.run(|spawner| { | ||
| 55 | unwrap!(spawner.spawn(run(dp, cp))); | ||
| 56 | }); | ||
| 57 | } | ||
diff --git a/embassy-stm32-examples/src/bin/rtc_async.rs_ b/embassy-stm32-examples/src/bin/rtc_async.rs_ deleted file mode 100644 index ea54a2a94..000000000 --- a/embassy-stm32-examples/src/bin/rtc_async.rs_ +++ /dev/null | |||
| @@ -1,39 +0,0 @@ | |||
| 1 | #![no_std] | ||
| 2 | #![no_main] | ||
| 3 | #![feature(min_type_alias_impl_trait)] | ||
| 4 | #![feature(impl_trait_in_bindings)] | ||
| 5 | #![feature(type_alias_impl_trait)] | ||
| 6 | |||
| 7 | #[path = "../example_common.rs"] | ||
| 8 | mod example_common; | ||
| 9 | use example_common::*; | ||
| 10 | |||
| 11 | use defmt::panic; | ||
| 12 | use embassy; | ||
| 13 | use embassy::executor::Spawner; | ||
| 14 | use embassy::time::{Duration, Timer}; | ||
| 15 | use embassy_stm32; | ||
| 16 | use embassy_stm32::hal; | ||
| 17 | |||
| 18 | #[embassy::task] | ||
| 19 | async fn run1() { | ||
| 20 | loop { | ||
| 21 | info!("BIG INFREQUENT TICK"); | ||
| 22 | Timer::after(Duration::from_ticks(32768 * 2 as u64)).await; | ||
| 23 | } | ||
| 24 | } | ||
| 25 | |||
| 26 | #[embassy::task] | ||
| 27 | async fn run2() { | ||
| 28 | loop { | ||
| 29 | info!("tick"); | ||
| 30 | Timer::after(Duration::from_ticks(13000 as u64)).await; | ||
| 31 | } | ||
| 32 | } | ||
| 33 | |||
| 34 | #[embassy::main(use_hse = 16)] | ||
| 35 | async fn main(spawner: Spawner) { | ||
| 36 | let (dp, clocks) = embassy_stm32::Peripherals::take().unwrap(); | ||
| 37 | |||
| 38 | spawner.spawn(run1()).unwrap(); | ||
| 39 | } | ||
diff --git a/embassy-stm32-examples/src/bin/serial.rs_ b/embassy-stm32-examples/src/bin/serial.rs_ deleted file mode 100644 index 9aeca5375..000000000 --- a/embassy-stm32-examples/src/bin/serial.rs_ +++ /dev/null | |||
| @@ -1,80 +0,0 @@ | |||
| 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 | use example_common::{panic, *}; | ||
| 11 | |||
| 12 | use cortex_m::singleton; | ||
| 13 | use cortex_m_rt::entry; | ||
| 14 | use embassy::executor::{Executor, Spawner}; | ||
| 15 | use embassy::traits::uart::{Read, ReadUntilIdle, Write}; | ||
| 16 | use embassy::util::Forever; | ||
| 17 | use embassy_stm32::hal::dma::StreamsTuple; | ||
| 18 | use embassy_stm32::hal::prelude::*; | ||
| 19 | use embassy_stm32::hal::serial::config::Config; | ||
| 20 | use embassy_stm32::interrupt; | ||
| 21 | use embassy_stm32::pac as stm32; | ||
| 22 | use embassy_stm32::serial; | ||
| 23 | use futures::pin_mut; | ||
| 24 | |||
| 25 | #[embassy::main(use_hse = 16, sysclk = 48, pclk1 = 24)] | ||
| 26 | async fn main(spawner: Spawner) { | ||
| 27 | let (dp, clocks) = embassy_stm32::Peripherals::take().unwrap(); | ||
| 28 | let cp = cortex_m::peripheral::Peripherals::take().unwrap(); | ||
| 29 | |||
| 30 | dp.DBGMCU.cr.modify(|_, w| { | ||
| 31 | w.dbg_sleep().set_bit(); | ||
| 32 | w.dbg_standby().set_bit(); | ||
| 33 | w.dbg_stop().set_bit() | ||
| 34 | }); | ||
| 35 | |||
| 36 | // https://gist.github.com/thalesfragoso/a07340c5df6eee3b04c42fdc69ecdcb1 | ||
| 37 | let gpioa = dp.GPIOA.split(); | ||
| 38 | let streams = StreamsTuple::new(dp.DMA2); | ||
| 39 | |||
| 40 | let _serial = unsafe { | ||
| 41 | serial::Serial::new( | ||
| 42 | dp.USART1, | ||
| 43 | (streams.7, streams.2), | ||
| 44 | ( | ||
| 45 | gpioa.pa9.into_alternate_af7(), | ||
| 46 | gpioa.pa10.into_alternate_af7(), | ||
| 47 | ), | ||
| 48 | interrupt::take!(DMA2_STREAM7), | ||
| 49 | interrupt::take!(DMA2_STREAM2), | ||
| 50 | interrupt::take!(USART1), | ||
| 51 | Config::default().baudrate(9600.bps()), | ||
| 52 | clocks, | ||
| 53 | ) | ||
| 54 | }; | ||
| 55 | |||
| 56 | let streams = StreamsTuple::new(dp.DMA1); | ||
| 57 | |||
| 58 | let mut serial = unsafe { | ||
| 59 | serial::Serial::new( | ||
| 60 | dp.USART2, | ||
| 61 | (streams.6, streams.5), | ||
| 62 | ( | ||
| 63 | gpioa.pa2.into_alternate_af7(), | ||
| 64 | gpioa.pa3.into_alternate_af7(), | ||
| 65 | ), | ||
| 66 | interrupt::take!(DMA1_STREAM6), | ||
| 67 | interrupt::take!(DMA1_STREAM5), | ||
| 68 | interrupt::take!(USART2), | ||
| 69 | Config::default().baudrate(9600.bps()), | ||
| 70 | clocks, | ||
| 71 | ) | ||
| 72 | }; | ||
| 73 | pin_mut!(serial); | ||
| 74 | |||
| 75 | let buf = singleton!(: [u8; 30] = [0; 30]).unwrap(); | ||
| 76 | |||
| 77 | buf[5] = 0x01; | ||
| 78 | serial.as_mut().write(buf).await.unwrap(); | ||
| 79 | serial.as_mut().read_until_idle(buf).await.unwrap(); | ||
| 80 | } | ||
diff --git a/embassy-stm32-examples/src/bin/usart_dma.rs b/embassy-stm32-examples/src/bin/usart_dma.rs new file mode 100644 index 000000000..c8b7d645b --- /dev/null +++ b/embassy-stm32-examples/src/bin/usart_dma.rs | |||
| @@ -0,0 +1,89 @@ | |||
| 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 | use core::fmt::Write; | ||
| 11 | use cortex_m_rt::entry; | ||
| 12 | use embassy::executor::Executor; | ||
| 13 | use embassy::time::Clock; | ||
| 14 | use embassy::util::Forever; | ||
| 15 | use embassy_stm32::usart::{Config, Uart}; | ||
| 16 | use example_common::*; | ||
| 17 | use heapless::String; | ||
| 18 | use stm32f4::stm32f429 as pac; | ||
| 19 | |||
| 20 | #[embassy::task] | ||
| 21 | async fn main_task() { | ||
| 22 | let mut p = embassy_stm32::init(Default::default()); | ||
| 23 | |||
| 24 | let config = Config::default(); | ||
| 25 | let mut usart = Uart::new(p.USART3, p.PD9, p.PD8, config, 16_000_000); | ||
| 26 | |||
| 27 | for n in 0.. { | ||
| 28 | let mut s: String<128> = String::new(); | ||
| 29 | core::write!(&mut s, "Hello DMA World {}!\r\n", n).unwrap(); | ||
| 30 | |||
| 31 | usart | ||
| 32 | .write_dma(&mut p.DMA1_CH3, s.as_bytes()) | ||
| 33 | .await | ||
| 34 | .unwrap(); | ||
| 35 | info!("wrote DMA"); | ||
| 36 | } | ||
| 37 | } | ||
| 38 | |||
| 39 | struct ZeroClock; | ||
| 40 | |||
| 41 | impl Clock for ZeroClock { | ||
| 42 | fn now(&self) -> u64 { | ||
| 43 | 0 | ||
| 44 | } | ||
| 45 | } | ||
| 46 | |||
| 47 | static EXECUTOR: Forever<Executor> = Forever::new(); | ||
| 48 | |||
| 49 | #[entry] | ||
| 50 | fn main() -> ! { | ||
| 51 | info!("Hello World!"); | ||
| 52 | |||
| 53 | let pp = pac::Peripherals::take().unwrap(); | ||
| 54 | |||
| 55 | pp.DBGMCU.cr.modify(|_, w| { | ||
| 56 | w.dbg_sleep().set_bit(); | ||
| 57 | w.dbg_standby().set_bit(); | ||
| 58 | w.dbg_stop().set_bit() | ||
| 59 | }); | ||
| 60 | pp.RCC.ahb1enr.modify(|_, w| w.dma1en().enabled()); | ||
| 61 | |||
| 62 | pp.RCC.ahb1enr.modify(|_, w| { | ||
| 63 | w.gpioaen().enabled(); | ||
| 64 | w.gpioben().enabled(); | ||
| 65 | w.gpiocen().enabled(); | ||
| 66 | w.gpioden().enabled(); | ||
| 67 | w.gpioeen().enabled(); | ||
| 68 | w.gpiofen().enabled(); | ||
| 69 | w.dma1en().enabled(); | ||
| 70 | w.dma2en().enabled(); | ||
| 71 | w | ||
| 72 | }); | ||
| 73 | pp.RCC.apb2enr.modify(|_, w| { | ||
| 74 | w.syscfgen().enabled(); | ||
| 75 | w | ||
| 76 | }); | ||
| 77 | pp.RCC.apb1enr.modify(|_, w| { | ||
| 78 | w.usart3en().enabled(); | ||
| 79 | w | ||
| 80 | }); | ||
| 81 | |||
| 82 | unsafe { embassy::time::set_clock(&ZeroClock) }; | ||
| 83 | |||
| 84 | let executor = EXECUTOR.put(Executor::new()); | ||
| 85 | |||
| 86 | executor.run(|spawner| { | ||
| 87 | unwrap!(spawner.spawn(main_task())); | ||
| 88 | }) | ||
| 89 | } | ||
diff --git a/embassy-stm32-examples/src/bin/usb_serial.rs_ b/embassy-stm32-examples/src/bin/usb_serial.rs_ deleted file mode 100644 index 6a1d27d54..000000000 --- a/embassy-stm32-examples/src/bin/usb_serial.rs_ +++ /dev/null | |||
| @@ -1,117 +0,0 @@ | |||
| 1 | #![no_std] | ||
| 2 | #![no_main] | ||
| 3 | #![feature(type_alias_impl_trait)] | ||
| 4 | #![feature(min_type_alias_impl_trait)] | ||
| 5 | #![feature(impl_trait_in_bindings)] | ||
| 6 | |||
| 7 | #[path = "../example_common.rs"] | ||
| 8 | mod example_common; | ||
| 9 | use example_common::*; | ||
| 10 | |||
| 11 | use cortex_m_rt::entry; | ||
| 12 | use defmt::panic; | ||
| 13 | use embassy::executor::{Executor, Spawner}; | ||
| 14 | use embassy::interrupt::InterruptExt; | ||
| 15 | use embassy::io::{AsyncBufReadExt, AsyncWriteExt}; | ||
| 16 | use embassy::time::{Duration, Timer}; | ||
| 17 | use embassy::util::Forever; | ||
| 18 | use embassy_extras::usb::usb_serial::UsbSerial; | ||
| 19 | use embassy_extras::usb::Usb; | ||
| 20 | use embassy_stm32::hal::otg_fs::{UsbBus, USB}; | ||
| 21 | use embassy_stm32::hal::prelude::*; | ||
| 22 | use embassy_stm32::{interrupt, pac, rtc}; | ||
| 23 | use futures::future::{select, Either}; | ||
| 24 | use futures::pin_mut; | ||
| 25 | use usb_device::bus::UsbBusAllocator; | ||
| 26 | use usb_device::prelude::*; | ||
| 27 | |||
| 28 | #[embassy::task] | ||
| 29 | async fn run1(bus: &'static mut UsbBusAllocator<UsbBus<USB>>) { | ||
| 30 | info!("Async task"); | ||
| 31 | |||
| 32 | let mut read_buf = [0u8; 128]; | ||
| 33 | let mut write_buf = [0u8; 128]; | ||
| 34 | let serial = UsbSerial::new(bus, &mut read_buf, &mut write_buf); | ||
| 35 | |||
| 36 | let device = UsbDeviceBuilder::new(bus, UsbVidPid(0x16c0, 0x27dd)) | ||
| 37 | .manufacturer("Fake company") | ||
| 38 | .product("Serial port") | ||
| 39 | .serial_number("TEST") | ||
| 40 | .device_class(0x02) | ||
| 41 | .build(); | ||
| 42 | |||
| 43 | let irq = interrupt::take!(OTG_FS); | ||
| 44 | irq.set_priority(interrupt::Priority::Level3); | ||
| 45 | |||
| 46 | let usb = Usb::new(device, serial, irq); | ||
| 47 | pin_mut!(usb); | ||
| 48 | usb.as_mut().start(); | ||
| 49 | |||
| 50 | let (mut read_interface, mut write_interface) = usb.as_ref().take_serial_0(); | ||
| 51 | |||
| 52 | let mut buf = [0u8; 64]; | ||
| 53 | loop { | ||
| 54 | let mut n = 0; | ||
| 55 | let left = { | ||
| 56 | let recv_fut = async { | ||
| 57 | loop { | ||
| 58 | let byte = unwrap!(read_interface.read_byte().await); | ||
| 59 | unwrap!(write_interface.write_byte(byte).await); | ||
| 60 | buf[n] = byte; | ||
| 61 | |||
| 62 | n += 1; | ||
| 63 | if byte == b'\n' || byte == b'\r' || n == buf.len() { | ||
| 64 | break; | ||
| 65 | } | ||
| 66 | } | ||
| 67 | }; | ||
| 68 | pin_mut!(recv_fut); | ||
| 69 | |||
| 70 | let timeout = Timer::after(Duration::from_ticks(32768 * 10)); | ||
| 71 | |||
| 72 | match select(recv_fut, timeout).await { | ||
| 73 | Either::Left(_) => true, | ||
| 74 | Either::Right(_) => false, | ||
| 75 | } | ||
| 76 | }; | ||
| 77 | |||
| 78 | if left { | ||
| 79 | for c in buf[..n].iter_mut() { | ||
| 80 | if 0x61 <= *c && *c <= 0x7a { | ||
| 81 | *c &= !0x20; | ||
| 82 | } | ||
| 83 | } | ||
| 84 | unwrap!(write_interface.write_byte(b'\n').await); | ||
| 85 | unwrap!(write_interface.write_all(&buf[..n]).await); | ||
| 86 | unwrap!(write_interface.write_byte(b'\n').await); | ||
| 87 | } else { | ||
| 88 | unwrap!(write_interface.write_all(b"\r\nSend something\r\n").await); | ||
| 89 | } | ||
| 90 | } | ||
| 91 | } | ||
| 92 | |||
| 93 | static USB_BUS: Forever<UsbBusAllocator<UsbBus<USB>>> = Forever::new(); | ||
| 94 | |||
| 95 | #[embassy::main(use_hse = 25, sysclk = 48, require_pll48clk)] | ||
| 96 | async fn main(spawner: Spawner) -> ! { | ||
| 97 | static mut EP_MEMORY: [u32; 1024] = [0; 1024]; | ||
| 98 | |||
| 99 | info!("Hello World!"); | ||
| 100 | |||
| 101 | let (p, clocks) = embassy_stm32::Peripherals::take().unwrap(); | ||
| 102 | |||
| 103 | let gpioa = p.GPIOA.split(); | ||
| 104 | let usb = USB { | ||
| 105 | usb_global: p.OTG_FS_GLOBAL, | ||
| 106 | usb_device: p.OTG_FS_DEVICE, | ||
| 107 | usb_pwrclk: p.OTG_FS_PWRCLK, | ||
| 108 | pin_dm: gpioa.pa11.into_alternate_af10(), | ||
| 109 | pin_dp: gpioa.pa12.into_alternate_af10(), | ||
| 110 | hclk: clocks.hclk(), | ||
| 111 | }; | ||
| 112 | // Rust analyzer isn't recognizing the static ref magic `cortex-m` does | ||
| 113 | #[allow(unused_unsafe)] | ||
| 114 | let usb_bus = USB_BUS.put(UsbBus::new(usb, unsafe { &mut EP_MEMORY })); | ||
| 115 | |||
| 116 | spawner.spawn(run1(usb_bus)).unwrap(); | ||
| 117 | } | ||
diff --git a/embassy-stm32/gen.py b/embassy-stm32/gen.py index 96275df9a..3eb570f19 100644 --- a/embassy-stm32/gen.py +++ b/embassy-stm32/gen.py | |||
| @@ -145,10 +145,11 @@ for chip in chips.values(): | |||
| 145 | 145 | ||
| 146 | if block_mod == 'dma': | 146 | if block_mod == 'dma': |
| 147 | custom_singletons = True | 147 | custom_singletons = True |
| 148 | dma_num = int(name[3:])-1 # substract 1 because we want DMA1=0, DMA2=1 | ||
| 148 | for ch_num in range(8): | 149 | for ch_num in range(8): |
| 149 | channel = f'{name}_CH{ch_num}' | 150 | channel = f'{name}_CH{ch_num}' |
| 150 | peripheral_names.append(channel) | 151 | peripheral_names.append(channel) |
| 151 | f.write(f'impl_dma_channel!({channel}, {name}, {ch_num});') | 152 | f.write(f'impl_dma_channel!({channel}, {dma_num}, {ch_num});') |
| 152 | 153 | ||
| 153 | if peri['block'] == 'sdmmc_v2/SDMMC': | 154 | if peri['block'] == 'sdmmc_v2/SDMMC': |
| 154 | f.write(f'impl_sdmmc!({name});') | 155 | f.write(f'impl_sdmmc!({name});') |
diff --git a/embassy-stm32/src/dma.rs b/embassy-stm32/src/dma.rs deleted file mode 100644 index 3aeed50f0..000000000 --- a/embassy-stm32/src/dma.rs +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | #![macro_use] | ||
| 2 | use crate::pac::dma; | ||
| 3 | |||
| 4 | pub(crate) mod sealed { | ||
| 5 | use super::*; | ||
| 6 | |||
| 7 | pub trait Channel { | ||
| 8 | fn regs(&self) -> dma::Dma; | ||
| 9 | } | ||
| 10 | } | ||
| 11 | |||
| 12 | pub trait Channel: sealed::Channel + Sized { | ||
| 13 | fn num(&self) -> u8; | ||
| 14 | } | ||
| 15 | |||
| 16 | macro_rules! impl_dma_channel { | ||
| 17 | ($type:ident, $dma_inst:ident, $num:expr) => { | ||
| 18 | impl crate::dma::Channel for peripherals::$type { | ||
| 19 | #[inline] | ||
| 20 | fn num(&self) -> u8 { | ||
| 21 | $num | ||
| 22 | } | ||
| 23 | } | ||
| 24 | impl crate::dma::sealed::Channel for peripherals::$type { | ||
| 25 | #[inline] | ||
| 26 | fn regs(&self) -> dma::Dma { | ||
| 27 | crate::pac::$dma_inst | ||
| 28 | } | ||
| 29 | } | ||
| 30 | }; | ||
| 31 | } | ||
diff --git a/embassy-stm32/src/dma/dma_v2.rs b/embassy-stm32/src/dma/dma_v2.rs new file mode 100644 index 000000000..5228195ef --- /dev/null +++ b/embassy-stm32/src/dma/dma_v2.rs | |||
| @@ -0,0 +1,167 @@ | |||
| 1 | use core::sync::atomic::{AtomicU8, Ordering}; | ||
| 2 | use core::task::Poll; | ||
| 3 | |||
| 4 | use embassy::util::AtomicWaker; | ||
| 5 | use futures::future::poll_fn; | ||
| 6 | |||
| 7 | use super::*; | ||
| 8 | use crate::fmt::{assert, *}; | ||
| 9 | use crate::interrupt; | ||
| 10 | use crate::pac; | ||
| 11 | use crate::pac::dma::{regs, vals}; | ||
| 12 | |||
| 13 | const DMAS: [pac::dma::Dma; 2] = [pac::DMA1, pac::DMA2]; | ||
| 14 | |||
| 15 | const CH_COUNT: usize = 16; | ||
| 16 | const CH_STATUS_NONE: u8 = 0; | ||
| 17 | const CH_STATUS_COMPLETED: u8 = 1; | ||
| 18 | const CH_STATUS_ERROR: u8 = 2; | ||
| 19 | |||
| 20 | struct State { | ||
| 21 | ch_wakers: [AtomicWaker; CH_COUNT], | ||
| 22 | ch_status: [AtomicU8; CH_COUNT], | ||
| 23 | } | ||
| 24 | |||
| 25 | impl State { | ||
| 26 | const fn new() -> Self { | ||
| 27 | const AW: AtomicWaker = AtomicWaker::new(); | ||
| 28 | const AU: AtomicU8 = AtomicU8::new(CH_STATUS_NONE); | ||
| 29 | Self { | ||
| 30 | ch_wakers: [AW; CH_COUNT], | ||
| 31 | ch_status: [AU; CH_COUNT], | ||
| 32 | } | ||
| 33 | } | ||
| 34 | } | ||
| 35 | |||
| 36 | static STATE: State = State::new(); | ||
| 37 | |||
| 38 | pub(crate) async unsafe fn transfer_m2p( | ||
| 39 | ch: &mut impl Channel, | ||
| 40 | ch_func: u8, | ||
| 41 | src: &[u8], | ||
| 42 | dst: *mut u8, | ||
| 43 | ) { | ||
| 44 | let n = ch.num() as usize; | ||
| 45 | let r = ch.regs(); | ||
| 46 | let c = r.st(ch.ch_num() as _); | ||
| 47 | |||
| 48 | // ndtr is max 16 bits. | ||
| 49 | assert!(src.len() <= 0xFFFF); | ||
| 50 | |||
| 51 | // Reset status | ||
| 52 | STATE.ch_status[n].store(CH_STATUS_NONE, Ordering::Relaxed); | ||
| 53 | |||
| 54 | unsafe { | ||
| 55 | c.par().write_value(dst as _); | ||
| 56 | c.m0ar().write_value(src.as_ptr() as _); | ||
| 57 | c.ndtr().write_value(regs::Ndtr(src.len() as _)); | ||
| 58 | c.cr().write(|w| { | ||
| 59 | w.set_dir(vals::Dir::MEMORYTOPERIPHERAL); | ||
| 60 | w.set_msize(vals::Size::BITS8); | ||
| 61 | w.set_psize(vals::Size::BITS8); | ||
| 62 | w.set_minc(vals::Inc::INCREMENTED); | ||
| 63 | w.set_pinc(vals::Inc::FIXED); | ||
| 64 | w.set_chsel(ch_func); | ||
| 65 | w.set_teie(true); | ||
| 66 | w.set_tcie(true); | ||
| 67 | w.set_en(true); | ||
| 68 | }); | ||
| 69 | } | ||
| 70 | |||
| 71 | let res = poll_fn(|cx| { | ||
| 72 | STATE.ch_wakers[n].register(cx.waker()); | ||
| 73 | match STATE.ch_status[n].load(Ordering::Relaxed) { | ||
| 74 | CH_STATUS_NONE => Poll::Pending, | ||
| 75 | x => Poll::Ready(x), | ||
| 76 | } | ||
| 77 | }) | ||
| 78 | .await; | ||
| 79 | |||
| 80 | // TODO handle error | ||
| 81 | assert!(res == CH_STATUS_COMPLETED); | ||
| 82 | } | ||
| 83 | |||
| 84 | unsafe fn on_irq() { | ||
| 85 | for (dman, &dma) in DMAS.iter().enumerate() { | ||
| 86 | for isrn in 0..2 { | ||
| 87 | let isr = dma.isr(isrn).read(); | ||
| 88 | dma.ifcr(isrn).write_value(isr); | ||
| 89 | |||
| 90 | for chn in 0..4 { | ||
| 91 | let n = dman * 8 + isrn * 4 + chn; | ||
| 92 | if isr.teif(chn) { | ||
| 93 | STATE.ch_status[n].store(CH_STATUS_ERROR, Ordering::Relaxed); | ||
| 94 | STATE.ch_wakers[n].wake(); | ||
| 95 | } else if isr.tcif(chn) { | ||
| 96 | STATE.ch_status[n].store(CH_STATUS_COMPLETED, Ordering::Relaxed); | ||
| 97 | STATE.ch_wakers[n].wake(); | ||
| 98 | } | ||
| 99 | } | ||
| 100 | } | ||
| 101 | } | ||
| 102 | } | ||
| 103 | |||
| 104 | #[interrupt] | ||
| 105 | unsafe fn DMA1_Stream0() { | ||
| 106 | on_irq() | ||
| 107 | } | ||
| 108 | #[interrupt] | ||
| 109 | unsafe fn DMA1_Stream1() { | ||
| 110 | on_irq() | ||
| 111 | } | ||
| 112 | #[interrupt] | ||
| 113 | unsafe fn DMA1_Stream2() { | ||
| 114 | on_irq() | ||
| 115 | } | ||
| 116 | #[interrupt] | ||
| 117 | unsafe fn DMA1_Stream3() { | ||
| 118 | on_irq() | ||
| 119 | } | ||
| 120 | #[interrupt] | ||
| 121 | unsafe fn DMA1_Stream4() { | ||
| 122 | on_irq() | ||
| 123 | } | ||
| 124 | #[interrupt] | ||
| 125 | unsafe fn DMA1_Stream5() { | ||
| 126 | on_irq() | ||
| 127 | } | ||
| 128 | #[interrupt] | ||
| 129 | unsafe fn DMA1_Stream6() { | ||
| 130 | on_irq() | ||
| 131 | } | ||
| 132 | #[interrupt] | ||
| 133 | unsafe fn DMA1_Stream7() { | ||
| 134 | on_irq() | ||
| 135 | } | ||
| 136 | #[interrupt] | ||
| 137 | unsafe fn DMA2_Stream0() { | ||
| 138 | on_irq() | ||
| 139 | } | ||
| 140 | #[interrupt] | ||
| 141 | unsafe fn DMA2_Stream1() { | ||
| 142 | on_irq() | ||
| 143 | } | ||
| 144 | #[interrupt] | ||
| 145 | unsafe fn DMA2_Stream2() { | ||
| 146 | on_irq() | ||
| 147 | } | ||
| 148 | #[interrupt] | ||
| 149 | unsafe fn DMA2_Stream3() { | ||
| 150 | on_irq() | ||
| 151 | } | ||
| 152 | #[interrupt] | ||
| 153 | unsafe fn DMA2_Stream4() { | ||
| 154 | on_irq() | ||
| 155 | } | ||
| 156 | #[interrupt] | ||
| 157 | unsafe fn DMA2_Stream5() { | ||
| 158 | on_irq() | ||
| 159 | } | ||
| 160 | #[interrupt] | ||
| 161 | unsafe fn DMA2_Stream6() { | ||
| 162 | on_irq() | ||
| 163 | } | ||
| 164 | #[interrupt] | ||
| 165 | unsafe fn DMA2_Stream7() { | ||
| 166 | on_irq() | ||
| 167 | } | ||
diff --git a/embassy-stm32/src/dma/mod.rs b/embassy-stm32/src/dma/mod.rs new file mode 100644 index 000000000..c0bc497f2 --- /dev/null +++ b/embassy-stm32/src/dma/mod.rs | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | #![macro_use] | ||
| 2 | |||
| 3 | #[cfg_attr(feature = "_dma_v1", path = "dma_v1.rs")] | ||
| 4 | #[cfg_attr(feature = "_dma_v2", path = "dma_v2.rs")] | ||
| 5 | mod _version; | ||
| 6 | pub use _version::*; | ||
| 7 | |||
| 8 | use crate::pac; | ||
| 9 | |||
| 10 | pub(crate) mod sealed { | ||
| 11 | use super::*; | ||
| 12 | |||
| 13 | pub trait Channel { | ||
| 14 | fn num(&self) -> u8; | ||
| 15 | |||
| 16 | fn dma_num(&self) -> u8 { | ||
| 17 | self.num() / 8 | ||
| 18 | } | ||
| 19 | fn ch_num(&self) -> u8 { | ||
| 20 | self.num() % 8 | ||
| 21 | } | ||
| 22 | |||
| 23 | fn regs(&self) -> pac::dma::Dma { | ||
| 24 | match self.dma_num() { | ||
| 25 | 0 => pac::DMA1, | ||
| 26 | _ => pac::DMA2, | ||
| 27 | } | ||
| 28 | } | ||
| 29 | } | ||
| 30 | } | ||
| 31 | |||
| 32 | pub trait Channel: sealed::Channel + Sized {} | ||
| 33 | |||
| 34 | macro_rules! impl_dma_channel { | ||
| 35 | ($type:ident, $dma_num:expr, $ch_num:expr) => { | ||
| 36 | impl crate::dma::Channel for peripherals::$type {} | ||
| 37 | impl crate::dma::sealed::Channel for peripherals::$type { | ||
| 38 | #[inline] | ||
| 39 | fn num(&self) -> u8 { | ||
| 40 | $dma_num * 8 + $ch_num | ||
| 41 | } | ||
| 42 | } | ||
| 43 | }; | ||
| 44 | } | ||
diff --git a/embassy-stm32/src/lib.rs b/embassy-stm32/src/lib.rs index 29ea613f3..0f34edac9 100644 --- a/embassy-stm32/src/lib.rs +++ b/embassy-stm32/src/lib.rs | |||
| @@ -63,6 +63,24 @@ pub fn init(_config: Config) -> Peripherals { | |||
| 63 | interrupt::EXTI4::steal().enable(); | 63 | interrupt::EXTI4::steal().enable(); |
| 64 | interrupt::EXTI9_5::steal().enable(); | 64 | interrupt::EXTI9_5::steal().enable(); |
| 65 | interrupt::EXTI15_10::steal().enable(); | 65 | interrupt::EXTI15_10::steal().enable(); |
| 66 | interrupt::EXTI15_10::steal().enable(); | ||
| 67 | |||
| 68 | interrupt::DMA1_Stream0::steal().enable(); | ||
| 69 | interrupt::DMA1_Stream1::steal().enable(); | ||
| 70 | interrupt::DMA1_Stream2::steal().enable(); | ||
| 71 | interrupt::DMA1_Stream3::steal().enable(); | ||
| 72 | interrupt::DMA1_Stream4::steal().enable(); | ||
| 73 | interrupt::DMA1_Stream5::steal().enable(); | ||
| 74 | interrupt::DMA1_Stream6::steal().enable(); | ||
| 75 | interrupt::DMA1_Stream7::steal().enable(); | ||
| 76 | interrupt::DMA2_Stream0::steal().enable(); | ||
| 77 | interrupt::DMA2_Stream1::steal().enable(); | ||
| 78 | interrupt::DMA2_Stream2::steal().enable(); | ||
| 79 | interrupt::DMA2_Stream3::steal().enable(); | ||
| 80 | interrupt::DMA2_Stream4::steal().enable(); | ||
| 81 | interrupt::DMA2_Stream5::steal().enable(); | ||
| 82 | interrupt::DMA2_Stream6::steal().enable(); | ||
| 83 | interrupt::DMA2_Stream7::steal().enable(); | ||
| 66 | } | 84 | } |
| 67 | 85 | ||
| 68 | p | 86 | p |
diff --git a/embassy-stm32/src/pac/regs.rs b/embassy-stm32/src/pac/regs.rs index 2f1e448b8..96b692536 100644 --- a/embassy-stm32/src/pac/regs.rs +++ b/embassy-stm32/src/pac/regs.rs | |||
| @@ -1,19 +1,423 @@ | |||
| 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 syscfg_l4 { | ||
| 4 | use crate::generic::*; | ||
| 5 | #[doc = "System configuration controller"] | ||
| 6 | #[derive(Copy, Clone)] | ||
| 7 | pub struct Syscfg(pub *mut u8); | ||
| 8 | unsafe impl Send for Syscfg {} | ||
| 9 | unsafe impl Sync for Syscfg {} | ||
| 10 | impl Syscfg { | ||
| 11 | #[doc = "memory remap register"] | ||
| 12 | pub fn memrmp(self) -> Reg<regs::Memrmp, RW> { | ||
| 13 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 14 | } | ||
| 15 | #[doc = "configuration register 1"] | ||
| 16 | pub fn cfgr1(self) -> Reg<regs::Cfgr1, RW> { | ||
| 17 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 18 | } | ||
| 19 | #[doc = "external interrupt configuration register 1"] | ||
| 20 | pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> { | ||
| 21 | assert!(n < 4usize); | ||
| 22 | unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) } | ||
| 23 | } | ||
| 24 | #[doc = "SCSR"] | ||
| 25 | pub fn scsr(self) -> Reg<regs::Scsr, RW> { | ||
| 26 | unsafe { Reg::from_ptr(self.0.add(24usize)) } | ||
| 27 | } | ||
| 28 | #[doc = "CFGR2"] | ||
| 29 | pub fn cfgr2(self) -> Reg<regs::Cfgr2, RW> { | ||
| 30 | unsafe { Reg::from_ptr(self.0.add(28usize)) } | ||
| 31 | } | ||
| 32 | #[doc = "SWPR"] | ||
| 33 | pub fn swpr(self) -> Reg<regs::Swpr, W> { | ||
| 34 | unsafe { Reg::from_ptr(self.0.add(32usize)) } | ||
| 35 | } | ||
| 36 | #[doc = "SKR"] | ||
| 37 | pub fn skr(self) -> Reg<regs::Skr, W> { | ||
| 38 | unsafe { Reg::from_ptr(self.0.add(36usize)) } | ||
| 39 | } | ||
| 40 | } | ||
| 41 | pub mod regs { | ||
| 42 | use crate::generic::*; | ||
| 43 | #[doc = "external interrupt configuration register 4"] | ||
| 44 | #[repr(transparent)] | ||
| 45 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 46 | pub struct Exticr(pub u32); | ||
| 47 | impl Exticr { | ||
| 48 | #[doc = "EXTI12 configuration bits"] | ||
| 49 | pub fn exti(&self, n: usize) -> u8 { | ||
| 50 | assert!(n < 4usize); | ||
| 51 | let offs = 0usize + n * 4usize; | ||
| 52 | let val = (self.0 >> offs) & 0x0f; | ||
| 53 | val as u8 | ||
| 54 | } | ||
| 55 | #[doc = "EXTI12 configuration bits"] | ||
| 56 | pub fn set_exti(&mut self, n: usize, val: u8) { | ||
| 57 | assert!(n < 4usize); | ||
| 58 | let offs = 0usize + n * 4usize; | ||
| 59 | self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs); | ||
| 60 | } | ||
| 61 | } | ||
| 62 | impl Default for Exticr { | ||
| 63 | fn default() -> Exticr { | ||
| 64 | Exticr(0) | ||
| 65 | } | ||
| 66 | } | ||
| 67 | #[doc = "memory remap register"] | ||
| 68 | #[repr(transparent)] | ||
| 69 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 70 | pub struct Memrmp(pub u32); | ||
| 71 | impl Memrmp { | ||
| 72 | #[doc = "Memory mapping selection"] | ||
| 73 | pub const fn mem_mode(&self) -> u8 { | ||
| 74 | let val = (self.0 >> 0usize) & 0x07; | ||
| 75 | val as u8 | ||
| 76 | } | ||
| 77 | #[doc = "Memory mapping selection"] | ||
| 78 | pub fn set_mem_mode(&mut self, val: u8) { | ||
| 79 | self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); | ||
| 80 | } | ||
| 81 | #[doc = "QUADSPI memory mapping swap"] | ||
| 82 | pub const fn qfs(&self) -> bool { | ||
| 83 | let val = (self.0 >> 3usize) & 0x01; | ||
| 84 | val != 0 | ||
| 85 | } | ||
| 86 | #[doc = "QUADSPI memory mapping swap"] | ||
| 87 | pub fn set_qfs(&mut self, val: bool) { | ||
| 88 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | ||
| 89 | } | ||
| 90 | #[doc = "Flash Bank mode selection"] | ||
| 91 | pub const fn fb_mode(&self) -> bool { | ||
| 92 | let val = (self.0 >> 8usize) & 0x01; | ||
| 93 | val != 0 | ||
| 94 | } | ||
| 95 | #[doc = "Flash Bank mode selection"] | ||
| 96 | pub fn set_fb_mode(&mut self, val: bool) { | ||
| 97 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | ||
| 98 | } | ||
| 99 | } | ||
| 100 | impl Default for Memrmp { | ||
| 101 | fn default() -> Memrmp { | ||
| 102 | Memrmp(0) | ||
| 103 | } | ||
| 104 | } | ||
| 105 | #[doc = "SWPR"] | ||
| 106 | #[repr(transparent)] | ||
| 107 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 108 | pub struct Swpr(pub u32); | ||
| 109 | impl Swpr { | ||
| 110 | #[doc = "SRAWM2 write protection."] | ||
| 111 | pub fn pwp(&self, n: usize) -> bool { | ||
| 112 | assert!(n < 32usize); | ||
| 113 | let offs = 0usize + n * 1usize; | ||
| 114 | let val = (self.0 >> offs) & 0x01; | ||
| 115 | val != 0 | ||
| 116 | } | ||
| 117 | #[doc = "SRAWM2 write protection."] | ||
| 118 | pub fn set_pwp(&mut self, n: usize, val: bool) { | ||
| 119 | assert!(n < 32usize); | ||
| 120 | let offs = 0usize + n * 1usize; | ||
| 121 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 122 | } | ||
| 123 | } | ||
| 124 | impl Default for Swpr { | ||
| 125 | fn default() -> Swpr { | ||
| 126 | Swpr(0) | ||
| 127 | } | ||
| 128 | } | ||
| 129 | #[doc = "SKR"] | ||
| 130 | #[repr(transparent)] | ||
| 131 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 132 | pub struct Skr(pub u32); | ||
| 133 | impl Skr { | ||
| 134 | #[doc = "SRAM2 write protection key for software erase"] | ||
| 135 | pub const fn key(&self) -> u8 { | ||
| 136 | let val = (self.0 >> 0usize) & 0xff; | ||
| 137 | val as u8 | ||
| 138 | } | ||
| 139 | #[doc = "SRAM2 write protection key for software erase"] | ||
| 140 | pub fn set_key(&mut self, val: u8) { | ||
| 141 | self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); | ||
| 142 | } | ||
| 143 | } | ||
| 144 | impl Default for Skr { | ||
| 145 | fn default() -> Skr { | ||
| 146 | Skr(0) | ||
| 147 | } | ||
| 148 | } | ||
| 149 | #[doc = "CFGR2"] | ||
| 150 | #[repr(transparent)] | ||
| 151 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 152 | pub struct Cfgr2(pub u32); | ||
| 153 | impl Cfgr2 { | ||
| 154 | #[doc = "Cortex LOCKUP (Hardfault) output enable bit"] | ||
| 155 | pub const fn cll(&self) -> bool { | ||
| 156 | let val = (self.0 >> 0usize) & 0x01; | ||
| 157 | val != 0 | ||
| 158 | } | ||
| 159 | #[doc = "Cortex LOCKUP (Hardfault) output enable bit"] | ||
| 160 | pub fn set_cll(&mut self, val: bool) { | ||
| 161 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 162 | } | ||
| 163 | #[doc = "SRAM2 parity lock bit"] | ||
| 164 | pub const fn spl(&self) -> bool { | ||
| 165 | let val = (self.0 >> 1usize) & 0x01; | ||
| 166 | val != 0 | ||
| 167 | } | ||
| 168 | #[doc = "SRAM2 parity lock bit"] | ||
| 169 | pub fn set_spl(&mut self, val: bool) { | ||
| 170 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 171 | } | ||
| 172 | #[doc = "PVD lock enable bit"] | ||
| 173 | pub const fn pvdl(&self) -> bool { | ||
| 174 | let val = (self.0 >> 2usize) & 0x01; | ||
| 175 | val != 0 | ||
| 176 | } | ||
| 177 | #[doc = "PVD lock enable bit"] | ||
| 178 | pub fn set_pvdl(&mut self, val: bool) { | ||
| 179 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | ||
| 180 | } | ||
| 181 | #[doc = "ECC Lock"] | ||
| 182 | pub const fn eccl(&self) -> bool { | ||
| 183 | let val = (self.0 >> 3usize) & 0x01; | ||
| 184 | val != 0 | ||
| 185 | } | ||
| 186 | #[doc = "ECC Lock"] | ||
| 187 | pub fn set_eccl(&mut self, val: bool) { | ||
| 188 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | ||
| 189 | } | ||
| 190 | #[doc = "SRAM2 parity error flag"] | ||
| 191 | pub const fn spf(&self) -> bool { | ||
| 192 | let val = (self.0 >> 8usize) & 0x01; | ||
| 193 | val != 0 | ||
| 194 | } | ||
| 195 | #[doc = "SRAM2 parity error flag"] | ||
| 196 | pub fn set_spf(&mut self, val: bool) { | ||
| 197 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | ||
| 198 | } | ||
| 199 | } | ||
| 200 | impl Default for Cfgr2 { | ||
| 201 | fn default() -> Cfgr2 { | ||
| 202 | Cfgr2(0) | ||
| 203 | } | ||
| 204 | } | ||
| 205 | #[doc = "SCSR"] | ||
| 206 | #[repr(transparent)] | ||
| 207 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 208 | pub struct Scsr(pub u32); | ||
| 209 | impl Scsr { | ||
| 210 | #[doc = "SRAM2 Erase"] | ||
| 211 | pub const fn sram2er(&self) -> bool { | ||
| 212 | let val = (self.0 >> 0usize) & 0x01; | ||
| 213 | val != 0 | ||
| 214 | } | ||
| 215 | #[doc = "SRAM2 Erase"] | ||
| 216 | pub fn set_sram2er(&mut self, val: bool) { | ||
| 217 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 218 | } | ||
| 219 | #[doc = "SRAM2 busy by erase operation"] | ||
| 220 | pub const fn sram2bsy(&self) -> bool { | ||
| 221 | let val = (self.0 >> 1usize) & 0x01; | ||
| 222 | val != 0 | ||
| 223 | } | ||
| 224 | #[doc = "SRAM2 busy by erase operation"] | ||
| 225 | pub fn set_sram2bsy(&mut self, val: bool) { | ||
| 226 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 227 | } | ||
| 228 | } | ||
| 229 | impl Default for Scsr { | ||
| 230 | fn default() -> Scsr { | ||
| 231 | Scsr(0) | ||
| 232 | } | ||
| 233 | } | ||
| 234 | #[doc = "configuration register 1"] | ||
| 235 | #[repr(transparent)] | ||
| 236 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 237 | pub struct Cfgr1(pub u32); | ||
| 238 | impl Cfgr1 { | ||
| 239 | #[doc = "Firewall disable"] | ||
| 240 | pub const fn fwdis(&self) -> bool { | ||
| 241 | let val = (self.0 >> 0usize) & 0x01; | ||
| 242 | val != 0 | ||
| 243 | } | ||
| 244 | #[doc = "Firewall disable"] | ||
| 245 | pub fn set_fwdis(&mut self, val: bool) { | ||
| 246 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 247 | } | ||
| 248 | #[doc = "I/O analog switch voltage booster enable"] | ||
| 249 | pub const fn boosten(&self) -> bool { | ||
| 250 | let val = (self.0 >> 8usize) & 0x01; | ||
| 251 | val != 0 | ||
| 252 | } | ||
| 253 | #[doc = "I/O analog switch voltage booster enable"] | ||
| 254 | pub fn set_boosten(&mut self, val: bool) { | ||
| 255 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | ||
| 256 | } | ||
| 257 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"] | ||
| 258 | pub const fn i2c_pb6_fmp(&self) -> bool { | ||
| 259 | let val = (self.0 >> 16usize) & 0x01; | ||
| 260 | val != 0 | ||
| 261 | } | ||
| 262 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"] | ||
| 263 | pub fn set_i2c_pb6_fmp(&mut self, val: bool) { | ||
| 264 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | ||
| 265 | } | ||
| 266 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"] | ||
| 267 | pub const fn i2c_pb7_fmp(&self) -> bool { | ||
| 268 | let val = (self.0 >> 17usize) & 0x01; | ||
| 269 | val != 0 | ||
| 270 | } | ||
| 271 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"] | ||
| 272 | pub fn set_i2c_pb7_fmp(&mut self, val: bool) { | ||
| 273 | self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); | ||
| 274 | } | ||
| 275 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"] | ||
| 276 | pub const fn i2c_pb8_fmp(&self) -> bool { | ||
| 277 | let val = (self.0 >> 18usize) & 0x01; | ||
| 278 | val != 0 | ||
| 279 | } | ||
| 280 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"] | ||
| 281 | pub fn set_i2c_pb8_fmp(&mut self, val: bool) { | ||
| 282 | self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); | ||
| 283 | } | ||
| 284 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"] | ||
| 285 | pub const fn i2c_pb9_fmp(&self) -> bool { | ||
| 286 | let val = (self.0 >> 19usize) & 0x01; | ||
| 287 | val != 0 | ||
| 288 | } | ||
| 289 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"] | ||
| 290 | pub fn set_i2c_pb9_fmp(&mut self, val: bool) { | ||
| 291 | self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); | ||
| 292 | } | ||
| 293 | #[doc = "I2C1 Fast-mode Plus driving capability activation"] | ||
| 294 | pub const fn i2c1_fmp(&self) -> bool { | ||
| 295 | let val = (self.0 >> 20usize) & 0x01; | ||
| 296 | val != 0 | ||
| 297 | } | ||
| 298 | #[doc = "I2C1 Fast-mode Plus driving capability activation"] | ||
| 299 | pub fn set_i2c1_fmp(&mut self, val: bool) { | ||
| 300 | self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); | ||
| 301 | } | ||
| 302 | #[doc = "I2C2 Fast-mode Plus driving capability activation"] | ||
| 303 | pub const fn i2c2_fmp(&self) -> bool { | ||
| 304 | let val = (self.0 >> 21usize) & 0x01; | ||
| 305 | val != 0 | ||
| 306 | } | ||
| 307 | #[doc = "I2C2 Fast-mode Plus driving capability activation"] | ||
| 308 | pub fn set_i2c2_fmp(&mut self, val: bool) { | ||
| 309 | self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); | ||
| 310 | } | ||
| 311 | #[doc = "I2C3 Fast-mode Plus driving capability activation"] | ||
| 312 | pub const fn i2c3_fmp(&self) -> bool { | ||
| 313 | let val = (self.0 >> 22usize) & 0x01; | ||
| 314 | val != 0 | ||
| 315 | } | ||
| 316 | #[doc = "I2C3 Fast-mode Plus driving capability activation"] | ||
| 317 | pub fn set_i2c3_fmp(&mut self, val: bool) { | ||
| 318 | self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); | ||
| 319 | } | ||
| 320 | #[doc = "Floating Point Unit interrupts enable bits"] | ||
| 321 | pub const fn fpu_ie(&self) -> u8 { | ||
| 322 | let val = (self.0 >> 26usize) & 0x3f; | ||
| 323 | val as u8 | ||
| 324 | } | ||
| 325 | #[doc = "Floating Point Unit interrupts enable bits"] | ||
| 326 | pub fn set_fpu_ie(&mut self, val: u8) { | ||
| 327 | self.0 = (self.0 & !(0x3f << 26usize)) | (((val as u32) & 0x3f) << 26usize); | ||
| 328 | } | ||
| 329 | } | ||
| 330 | impl Default for Cfgr1 { | ||
| 331 | fn default() -> Cfgr1 { | ||
| 332 | Cfgr1(0) | ||
| 333 | } | ||
| 334 | } | ||
| 335 | } | ||
| 336 | } | ||
| 337 | pub mod generic { | ||
| 338 | use core::marker::PhantomData; | ||
| 339 | #[derive(Copy, Clone)] | ||
| 340 | pub struct RW; | ||
| 341 | #[derive(Copy, Clone)] | ||
| 342 | pub struct R; | ||
| 343 | #[derive(Copy, Clone)] | ||
| 344 | pub struct W; | ||
| 345 | mod sealed { | ||
| 346 | use super::*; | ||
| 347 | pub trait Access {} | ||
| 348 | impl Access for R {} | ||
| 349 | impl Access for W {} | ||
| 350 | impl Access for RW {} | ||
| 351 | } | ||
| 352 | pub trait Access: sealed::Access + Copy {} | ||
| 353 | impl Access for R {} | ||
| 354 | impl Access for W {} | ||
| 355 | impl Access for RW {} | ||
| 356 | pub trait Read: Access {} | ||
| 357 | impl Read for RW {} | ||
| 358 | impl Read for R {} | ||
| 359 | pub trait Write: Access {} | ||
| 360 | impl Write for RW {} | ||
| 361 | impl Write for W {} | ||
| 362 | #[derive(Copy, Clone)] | ||
| 363 | pub struct Reg<T: Copy, A: Access> { | ||
| 364 | ptr: *mut u8, | ||
| 365 | phantom: PhantomData<*mut (T, A)>, | ||
| 366 | } | ||
| 367 | unsafe impl<T: Copy, A: Access> Send for Reg<T, A> {} | ||
| 368 | unsafe impl<T: Copy, A: Access> Sync for Reg<T, A> {} | ||
| 369 | impl<T: Copy, A: Access> Reg<T, A> { | ||
| 370 | pub fn from_ptr(ptr: *mut u8) -> Self { | ||
| 371 | Self { | ||
| 372 | ptr, | ||
| 373 | phantom: PhantomData, | ||
| 374 | } | ||
| 375 | } | ||
| 376 | pub fn ptr(&self) -> *mut T { | ||
| 377 | self.ptr as _ | ||
| 378 | } | ||
| 379 | } | ||
| 380 | impl<T: Copy, A: Read> Reg<T, A> { | ||
| 381 | pub unsafe fn read(&self) -> T { | ||
| 382 | (self.ptr as *mut T).read_volatile() | ||
| 383 | } | ||
| 384 | } | ||
| 385 | impl<T: Copy, A: Write> Reg<T, A> { | ||
| 386 | pub unsafe fn write_value(&self, val: T) { | ||
| 387 | (self.ptr as *mut T).write_volatile(val) | ||
| 388 | } | ||
| 389 | } | ||
| 390 | impl<T: Default + Copy, A: Write> Reg<T, A> { | ||
| 391 | pub unsafe fn write<R>(&self, f: impl FnOnce(&mut T) -> R) -> R { | ||
| 392 | let mut val = Default::default(); | ||
| 393 | let res = f(&mut val); | ||
| 394 | self.write_value(val); | ||
| 395 | res | ||
| 396 | } | ||
| 397 | } | ||
| 398 | impl<T: Copy, A: Read + Write> Reg<T, A> { | ||
| 399 | pub unsafe fn modify<R>(&self, f: impl FnOnce(&mut T) -> R) -> R { | ||
| 400 | let mut val = self.read(); | ||
| 401 | let res = f(&mut val); | ||
| 402 | self.write_value(val); | ||
| 403 | res | ||
| 404 | } | ||
| 405 | } | ||
| 406 | } | ||
| 3 | pub mod timer_v1 { | 407 | pub mod timer_v1 { |
| 4 | use crate::generic::*; | 408 | use crate::generic::*; |
| 5 | #[doc = "Advanced-timers"] | 409 | #[doc = "General purpose 16-bit timer"] |
| 6 | #[derive(Copy, Clone)] | 410 | #[derive(Copy, Clone)] |
| 7 | pub struct TimAdv(pub *mut u8); | 411 | pub struct TimGp16(pub *mut u8); |
| 8 | unsafe impl Send for TimAdv {} | 412 | unsafe impl Send for TimGp16 {} |
| 9 | unsafe impl Sync for TimAdv {} | 413 | unsafe impl Sync for TimGp16 {} |
| 10 | impl TimAdv { | 414 | impl TimGp16 { |
| 11 | #[doc = "control register 1"] | 415 | #[doc = "control register 1"] |
| 12 | pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> { | 416 | pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> { |
| 13 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | 417 | unsafe { Reg::from_ptr(self.0.add(0usize)) } |
| 14 | } | 418 | } |
| 15 | #[doc = "control register 2"] | 419 | #[doc = "control register 2"] |
| 16 | pub fn cr2(self) -> Reg<regs::Cr2Adv, RW> { | 420 | pub fn cr2(self) -> Reg<regs::Cr2Gp, RW> { |
| 17 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | 421 | unsafe { Reg::from_ptr(self.0.add(4usize)) } |
| 18 | } | 422 | } |
| 19 | #[doc = "slave mode control register"] | 423 | #[doc = "slave mode control register"] |
| @@ -21,15 +425,15 @@ pub mod timer_v1 { | |||
| 21 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | 425 | unsafe { Reg::from_ptr(self.0.add(8usize)) } |
| 22 | } | 426 | } |
| 23 | #[doc = "DMA/Interrupt enable register"] | 427 | #[doc = "DMA/Interrupt enable register"] |
| 24 | pub fn dier(self) -> Reg<regs::DierAdv, RW> { | 428 | pub fn dier(self) -> Reg<regs::DierGp, RW> { |
| 25 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | 429 | unsafe { Reg::from_ptr(self.0.add(12usize)) } |
| 26 | } | 430 | } |
| 27 | #[doc = "status register"] | 431 | #[doc = "status register"] |
| 28 | pub fn sr(self) -> Reg<regs::SrAdv, RW> { | 432 | pub fn sr(self) -> Reg<regs::SrGp, RW> { |
| 29 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | 433 | unsafe { Reg::from_ptr(self.0.add(16usize)) } |
| 30 | } | 434 | } |
| 31 | #[doc = "event generation register"] | 435 | #[doc = "event generation register"] |
| 32 | pub fn egr(self) -> Reg<regs::EgrAdv, W> { | 436 | pub fn egr(self) -> Reg<regs::EgrGp, W> { |
| 33 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | 437 | unsafe { Reg::from_ptr(self.0.add(20usize)) } |
| 34 | } | 438 | } |
| 35 | #[doc = "capture/compare mode register 1 (input mode)"] | 439 | #[doc = "capture/compare mode register 1 (input mode)"] |
| @@ -43,7 +447,7 @@ pub mod timer_v1 { | |||
| 43 | unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) } | 447 | unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) } |
| 44 | } | 448 | } |
| 45 | #[doc = "capture/compare enable register"] | 449 | #[doc = "capture/compare enable register"] |
| 46 | pub fn ccer(self) -> Reg<regs::CcerAdv, RW> { | 450 | pub fn ccer(self) -> Reg<regs::CcerGp, RW> { |
| 47 | unsafe { Reg::from_ptr(self.0.add(32usize)) } | 451 | unsafe { Reg::from_ptr(self.0.add(32usize)) } |
| 48 | } | 452 | } |
| 49 | #[doc = "counter"] | 453 | #[doc = "counter"] |
| @@ -58,19 +462,11 @@ pub mod timer_v1 { | |||
| 58 | pub fn arr(self) -> Reg<regs::Arr16, RW> { | 462 | pub fn arr(self) -> Reg<regs::Arr16, RW> { |
| 59 | unsafe { Reg::from_ptr(self.0.add(44usize)) } | 463 | unsafe { Reg::from_ptr(self.0.add(44usize)) } |
| 60 | } | 464 | } |
| 61 | #[doc = "repetition counter register"] | ||
| 62 | pub fn rcr(self) -> Reg<regs::Rcr, RW> { | ||
| 63 | unsafe { Reg::from_ptr(self.0.add(48usize)) } | ||
| 64 | } | ||
| 65 | #[doc = "capture/compare register"] | 465 | #[doc = "capture/compare register"] |
| 66 | pub fn ccr(self, n: usize) -> Reg<regs::Ccr16, RW> { | 466 | pub fn ccr(self, n: usize) -> Reg<regs::Ccr16, RW> { |
| 67 | assert!(n < 4usize); | 467 | assert!(n < 4usize); |
| 68 | unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) } | 468 | unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) } |
| 69 | } | 469 | } |
| 70 | #[doc = "break and dead-time register"] | ||
| 71 | pub fn bdtr(self) -> Reg<regs::Bdtr, RW> { | ||
| 72 | unsafe { Reg::from_ptr(self.0.add(68usize)) } | ||
| 73 | } | ||
| 74 | #[doc = "DMA control register"] | 470 | #[doc = "DMA control register"] |
| 75 | pub fn dcr(self) -> Reg<regs::Dcr, RW> { | 471 | pub fn dcr(self) -> Reg<regs::Dcr, RW> { |
| 76 | unsafe { Reg::from_ptr(self.0.add(72usize)) } | 472 | unsafe { Reg::from_ptr(self.0.add(72usize)) } |
| @@ -80,18 +476,18 @@ pub mod timer_v1 { | |||
| 80 | unsafe { Reg::from_ptr(self.0.add(76usize)) } | 476 | unsafe { Reg::from_ptr(self.0.add(76usize)) } |
| 81 | } | 477 | } |
| 82 | } | 478 | } |
| 83 | #[doc = "General purpose 16-bit timer"] | 479 | #[doc = "Advanced-timers"] |
| 84 | #[derive(Copy, Clone)] | 480 | #[derive(Copy, Clone)] |
| 85 | pub struct TimGp16(pub *mut u8); | 481 | pub struct TimAdv(pub *mut u8); |
| 86 | unsafe impl Send for TimGp16 {} | 482 | unsafe impl Send for TimAdv {} |
| 87 | unsafe impl Sync for TimGp16 {} | 483 | unsafe impl Sync for TimAdv {} |
| 88 | impl TimGp16 { | 484 | impl TimAdv { |
| 89 | #[doc = "control register 1"] | 485 | #[doc = "control register 1"] |
| 90 | pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> { | 486 | pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> { |
| 91 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | 487 | unsafe { Reg::from_ptr(self.0.add(0usize)) } |
| 92 | } | 488 | } |
| 93 | #[doc = "control register 2"] | 489 | #[doc = "control register 2"] |
| 94 | pub fn cr2(self) -> Reg<regs::Cr2Gp, RW> { | 490 | pub fn cr2(self) -> Reg<regs::Cr2Adv, RW> { |
| 95 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | 491 | unsafe { Reg::from_ptr(self.0.add(4usize)) } |
| 96 | } | 492 | } |
| 97 | #[doc = "slave mode control register"] | 493 | #[doc = "slave mode control register"] |
| @@ -99,15 +495,15 @@ pub mod timer_v1 { | |||
| 99 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | 495 | unsafe { Reg::from_ptr(self.0.add(8usize)) } |
| 100 | } | 496 | } |
| 101 | #[doc = "DMA/Interrupt enable register"] | 497 | #[doc = "DMA/Interrupt enable register"] |
| 102 | pub fn dier(self) -> Reg<regs::DierGp, RW> { | 498 | pub fn dier(self) -> Reg<regs::DierAdv, RW> { |
| 103 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | 499 | unsafe { Reg::from_ptr(self.0.add(12usize)) } |
| 104 | } | 500 | } |
| 105 | #[doc = "status register"] | 501 | #[doc = "status register"] |
| 106 | pub fn sr(self) -> Reg<regs::SrGp, RW> { | 502 | pub fn sr(self) -> Reg<regs::SrAdv, RW> { |
| 107 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | 503 | unsafe { Reg::from_ptr(self.0.add(16usize)) } |
| 108 | } | 504 | } |
| 109 | #[doc = "event generation register"] | 505 | #[doc = "event generation register"] |
| 110 | pub fn egr(self) -> Reg<regs::EgrGp, W> { | 506 | pub fn egr(self) -> Reg<regs::EgrAdv, W> { |
| 111 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | 507 | unsafe { Reg::from_ptr(self.0.add(20usize)) } |
| 112 | } | 508 | } |
| 113 | #[doc = "capture/compare mode register 1 (input mode)"] | 509 | #[doc = "capture/compare mode register 1 (input mode)"] |
| @@ -121,7 +517,7 @@ pub mod timer_v1 { | |||
| 121 | unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) } | 517 | unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) } |
| 122 | } | 518 | } |
| 123 | #[doc = "capture/compare enable register"] | 519 | #[doc = "capture/compare enable register"] |
| 124 | pub fn ccer(self) -> Reg<regs::CcerGp, RW> { | 520 | pub fn ccer(self) -> Reg<regs::CcerAdv, RW> { |
| 125 | unsafe { Reg::from_ptr(self.0.add(32usize)) } | 521 | unsafe { Reg::from_ptr(self.0.add(32usize)) } |
| 126 | } | 522 | } |
| 127 | #[doc = "counter"] | 523 | #[doc = "counter"] |
| @@ -136,11 +532,19 @@ pub mod timer_v1 { | |||
| 136 | pub fn arr(self) -> Reg<regs::Arr16, RW> { | 532 | pub fn arr(self) -> Reg<regs::Arr16, RW> { |
| 137 | unsafe { Reg::from_ptr(self.0.add(44usize)) } | 533 | unsafe { Reg::from_ptr(self.0.add(44usize)) } |
| 138 | } | 534 | } |
| 535 | #[doc = "repetition counter register"] | ||
| 536 | pub fn rcr(self) -> Reg<regs::Rcr, RW> { | ||
| 537 | unsafe { Reg::from_ptr(self.0.add(48usize)) } | ||
| 538 | } | ||
| 139 | #[doc = "capture/compare register"] | 539 | #[doc = "capture/compare register"] |
| 140 | pub fn ccr(self, n: usize) -> Reg<regs::Ccr16, RW> { | 540 | pub fn ccr(self, n: usize) -> Reg<regs::Ccr16, RW> { |
| 141 | assert!(n < 4usize); | 541 | assert!(n < 4usize); |
| 142 | unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) } | 542 | unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) } |
| 143 | } | 543 | } |
| 544 | #[doc = "break and dead-time register"] | ||
| 545 | pub fn bdtr(self) -> Reg<regs::Bdtr, RW> { | ||
| 546 | unsafe { Reg::from_ptr(self.0.add(68usize)) } | ||
| 547 | } | ||
| 144 | #[doc = "DMA control register"] | 548 | #[doc = "DMA control register"] |
| 145 | pub fn dcr(self) -> Reg<regs::Dcr, RW> { | 549 | pub fn dcr(self) -> Reg<regs::Dcr, RW> { |
| 146 | unsafe { Reg::from_ptr(self.0.add(72usize)) } | 550 | unsafe { Reg::from_ptr(self.0.add(72usize)) } |
| @@ -150,45 +554,6 @@ pub mod timer_v1 { | |||
| 150 | unsafe { Reg::from_ptr(self.0.add(76usize)) } | 554 | unsafe { Reg::from_ptr(self.0.add(76usize)) } |
| 151 | } | 555 | } |
| 152 | } | 556 | } |
| 153 | #[doc = "Basic timer"] | ||
| 154 | #[derive(Copy, Clone)] | ||
| 155 | pub struct TimBasic(pub *mut u8); | ||
| 156 | unsafe impl Send for TimBasic {} | ||
| 157 | unsafe impl Sync for TimBasic {} | ||
| 158 | impl TimBasic { | ||
| 159 | #[doc = "control register 1"] | ||
| 160 | pub fn cr1(self) -> Reg<regs::Cr1Basic, RW> { | ||
| 161 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 162 | } | ||
| 163 | #[doc = "control register 2"] | ||
| 164 | pub fn cr2(self) -> Reg<regs::Cr2Basic, RW> { | ||
| 165 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 166 | } | ||
| 167 | #[doc = "DMA/Interrupt enable register"] | ||
| 168 | pub fn dier(self) -> Reg<regs::DierBasic, RW> { | ||
| 169 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 170 | } | ||
| 171 | #[doc = "status register"] | ||
| 172 | pub fn sr(self) -> Reg<regs::SrBasic, RW> { | ||
| 173 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 174 | } | ||
| 175 | #[doc = "event generation register"] | ||
| 176 | pub fn egr(self) -> Reg<regs::EgrBasic, W> { | ||
| 177 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | ||
| 178 | } | ||
| 179 | #[doc = "counter"] | ||
| 180 | pub fn cnt(self) -> Reg<regs::Cnt16, RW> { | ||
| 181 | unsafe { Reg::from_ptr(self.0.add(36usize)) } | ||
| 182 | } | ||
| 183 | #[doc = "prescaler"] | ||
| 184 | pub fn psc(self) -> Reg<regs::Psc, RW> { | ||
| 185 | unsafe { Reg::from_ptr(self.0.add(40usize)) } | ||
| 186 | } | ||
| 187 | #[doc = "auto-reload register"] | ||
| 188 | pub fn arr(self) -> Reg<regs::Arr16, RW> { | ||
| 189 | unsafe { Reg::from_ptr(self.0.add(44usize)) } | ||
| 190 | } | ||
| 191 | } | ||
| 192 | #[doc = "General purpose 32-bit timer"] | 557 | #[doc = "General purpose 32-bit timer"] |
| 193 | #[derive(Copy, Clone)] | 558 | #[derive(Copy, Clone)] |
| 194 | pub struct TimGp32(pub *mut u8); | 559 | pub struct TimGp32(pub *mut u8); |
| @@ -259,164 +624,387 @@ pub mod timer_v1 { | |||
| 259 | unsafe { Reg::from_ptr(self.0.add(76usize)) } | 624 | unsafe { Reg::from_ptr(self.0.add(76usize)) } |
| 260 | } | 625 | } |
| 261 | } | 626 | } |
| 627 | #[doc = "Basic timer"] | ||
| 628 | #[derive(Copy, Clone)] | ||
| 629 | pub struct TimBasic(pub *mut u8); | ||
| 630 | unsafe impl Send for TimBasic {} | ||
| 631 | unsafe impl Sync for TimBasic {} | ||
| 632 | impl TimBasic { | ||
| 633 | #[doc = "control register 1"] | ||
| 634 | pub fn cr1(self) -> Reg<regs::Cr1Basic, RW> { | ||
| 635 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 636 | } | ||
| 637 | #[doc = "control register 2"] | ||
| 638 | pub fn cr2(self) -> Reg<regs::Cr2Basic, RW> { | ||
| 639 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 640 | } | ||
| 641 | #[doc = "DMA/Interrupt enable register"] | ||
| 642 | pub fn dier(self) -> Reg<regs::DierBasic, RW> { | ||
| 643 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 644 | } | ||
| 645 | #[doc = "status register"] | ||
| 646 | pub fn sr(self) -> Reg<regs::SrBasic, RW> { | ||
| 647 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 648 | } | ||
| 649 | #[doc = "event generation register"] | ||
| 650 | pub fn egr(self) -> Reg<regs::EgrBasic, W> { | ||
| 651 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | ||
| 652 | } | ||
| 653 | #[doc = "counter"] | ||
| 654 | pub fn cnt(self) -> Reg<regs::Cnt16, RW> { | ||
| 655 | unsafe { Reg::from_ptr(self.0.add(36usize)) } | ||
| 656 | } | ||
| 657 | #[doc = "prescaler"] | ||
| 658 | pub fn psc(self) -> Reg<regs::Psc, RW> { | ||
| 659 | unsafe { Reg::from_ptr(self.0.add(40usize)) } | ||
| 660 | } | ||
| 661 | #[doc = "auto-reload register"] | ||
| 662 | pub fn arr(self) -> Reg<regs::Arr16, RW> { | ||
| 663 | unsafe { Reg::from_ptr(self.0.add(44usize)) } | ||
| 664 | } | ||
| 665 | } | ||
| 262 | pub mod regs { | 666 | pub mod regs { |
| 263 | use crate::generic::*; | 667 | use crate::generic::*; |
| 264 | #[doc = "capture/compare enable register"] | 668 | #[doc = "control register 1"] |
| 265 | #[repr(transparent)] | 669 | #[repr(transparent)] |
| 266 | #[derive(Copy, Clone, Eq, PartialEq)] | 670 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 267 | pub struct CcerAdv(pub u32); | 671 | pub struct Cr1Basic(pub u32); |
| 268 | impl CcerAdv { | 672 | impl Cr1Basic { |
| 269 | #[doc = "Capture/Compare 1 output enable"] | 673 | #[doc = "Counter enable"] |
| 270 | pub fn cce(&self, n: usize) -> bool { | 674 | pub const fn cen(&self) -> bool { |
| 271 | assert!(n < 4usize); | 675 | let val = (self.0 >> 0usize) & 0x01; |
| 272 | let offs = 0usize + n * 4usize; | ||
| 273 | let val = (self.0 >> offs) & 0x01; | ||
| 274 | val != 0 | 676 | val != 0 |
| 275 | } | 677 | } |
| 276 | #[doc = "Capture/Compare 1 output enable"] | 678 | #[doc = "Counter enable"] |
| 277 | pub fn set_cce(&mut self, n: usize, val: bool) { | 679 | pub fn set_cen(&mut self, val: bool) { |
| 278 | assert!(n < 4usize); | 680 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 279 | let offs = 0usize + n * 4usize; | ||
| 280 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 281 | } | 681 | } |
| 282 | #[doc = "Capture/Compare 1 output Polarity"] | 682 | #[doc = "Update disable"] |
| 283 | pub fn ccp(&self, n: usize) -> bool { | 683 | pub const fn udis(&self) -> bool { |
| 284 | assert!(n < 4usize); | 684 | let val = (self.0 >> 1usize) & 0x01; |
| 285 | let offs = 1usize + n * 4usize; | ||
| 286 | let val = (self.0 >> offs) & 0x01; | ||
| 287 | val != 0 | 685 | val != 0 |
| 288 | } | 686 | } |
| 289 | #[doc = "Capture/Compare 1 output Polarity"] | 687 | #[doc = "Update disable"] |
| 290 | pub fn set_ccp(&mut self, n: usize, val: bool) { | 688 | pub fn set_udis(&mut self, val: bool) { |
| 291 | assert!(n < 4usize); | 689 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 292 | let offs = 1usize + n * 4usize; | ||
| 293 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 294 | } | 690 | } |
| 295 | #[doc = "Capture/Compare 1 complementary output enable"] | 691 | #[doc = "Update request source"] |
| 296 | pub fn ccne(&self, n: usize) -> bool { | 692 | pub const fn urs(&self) -> super::vals::Urs { |
| 297 | assert!(n < 4usize); | 693 | let val = (self.0 >> 2usize) & 0x01; |
| 298 | let offs = 2usize + n * 4usize; | 694 | super::vals::Urs(val as u8) |
| 299 | let val = (self.0 >> offs) & 0x01; | 695 | } |
| 696 | #[doc = "Update request source"] | ||
| 697 | pub fn set_urs(&mut self, val: super::vals::Urs) { | ||
| 698 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); | ||
| 699 | } | ||
| 700 | #[doc = "One-pulse mode"] | ||
| 701 | pub const fn opm(&self) -> super::vals::Opm { | ||
| 702 | let val = (self.0 >> 3usize) & 0x01; | ||
| 703 | super::vals::Opm(val as u8) | ||
| 704 | } | ||
| 705 | #[doc = "One-pulse mode"] | ||
| 706 | pub fn set_opm(&mut self, val: super::vals::Opm) { | ||
| 707 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); | ||
| 708 | } | ||
| 709 | #[doc = "Auto-reload preload enable"] | ||
| 710 | pub const fn arpe(&self) -> super::vals::Arpe { | ||
| 711 | let val = (self.0 >> 7usize) & 0x01; | ||
| 712 | super::vals::Arpe(val as u8) | ||
| 713 | } | ||
| 714 | #[doc = "Auto-reload preload enable"] | ||
| 715 | pub fn set_arpe(&mut self, val: super::vals::Arpe) { | ||
| 716 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); | ||
| 717 | } | ||
| 718 | } | ||
| 719 | impl Default for Cr1Basic { | ||
| 720 | fn default() -> Cr1Basic { | ||
| 721 | Cr1Basic(0) | ||
| 722 | } | ||
| 723 | } | ||
| 724 | #[doc = "DMA/Interrupt enable register"] | ||
| 725 | #[repr(transparent)] | ||
| 726 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 727 | pub struct DierBasic(pub u32); | ||
| 728 | impl DierBasic { | ||
| 729 | #[doc = "Update interrupt enable"] | ||
| 730 | pub const fn uie(&self) -> bool { | ||
| 731 | let val = (self.0 >> 0usize) & 0x01; | ||
| 300 | val != 0 | 732 | val != 0 |
| 301 | } | 733 | } |
| 302 | #[doc = "Capture/Compare 1 complementary output enable"] | 734 | #[doc = "Update interrupt enable"] |
| 303 | pub fn set_ccne(&mut self, n: usize, val: bool) { | 735 | pub fn set_uie(&mut self, val: bool) { |
| 304 | assert!(n < 4usize); | 736 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 305 | let offs = 2usize + n * 4usize; | ||
| 306 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 307 | } | 737 | } |
| 308 | #[doc = "Capture/Compare 1 output Polarity"] | 738 | #[doc = "Update DMA request enable"] |
| 309 | pub fn ccnp(&self, n: usize) -> bool { | 739 | pub const fn ude(&self) -> bool { |
| 310 | assert!(n < 4usize); | 740 | let val = (self.0 >> 8usize) & 0x01; |
| 311 | let offs = 3usize + n * 4usize; | ||
| 312 | let val = (self.0 >> offs) & 0x01; | ||
| 313 | val != 0 | 741 | val != 0 |
| 314 | } | 742 | } |
| 315 | #[doc = "Capture/Compare 1 output Polarity"] | 743 | #[doc = "Update DMA request enable"] |
| 316 | pub fn set_ccnp(&mut self, n: usize, val: bool) { | 744 | pub fn set_ude(&mut self, val: bool) { |
| 317 | assert!(n < 4usize); | 745 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 318 | let offs = 3usize + n * 4usize; | ||
| 319 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 320 | } | 746 | } |
| 321 | } | 747 | } |
| 322 | impl Default for CcerAdv { | 748 | impl Default for DierBasic { |
| 323 | fn default() -> CcerAdv { | 749 | fn default() -> DierBasic { |
| 324 | CcerAdv(0) | 750 | DierBasic(0) |
| 325 | } | 751 | } |
| 326 | } | 752 | } |
| 327 | #[doc = "slave mode control register"] | 753 | #[doc = "status register"] |
| 328 | #[repr(transparent)] | 754 | #[repr(transparent)] |
| 329 | #[derive(Copy, Clone, Eq, PartialEq)] | 755 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 330 | pub struct Smcr(pub u32); | 756 | pub struct SrBasic(pub u32); |
| 331 | impl Smcr { | 757 | impl SrBasic { |
| 332 | #[doc = "Slave mode selection"] | 758 | #[doc = "Update interrupt flag"] |
| 333 | pub const fn sms(&self) -> super::vals::Sms { | 759 | pub const fn uif(&self) -> bool { |
| 334 | let val = (self.0 >> 0usize) & 0x07; | 760 | let val = (self.0 >> 0usize) & 0x01; |
| 335 | super::vals::Sms(val as u8) | 761 | val != 0 |
| 336 | } | 762 | } |
| 337 | #[doc = "Slave mode selection"] | 763 | #[doc = "Update interrupt flag"] |
| 338 | pub fn set_sms(&mut self, val: super::vals::Sms) { | 764 | pub fn set_uif(&mut self, val: bool) { |
| 339 | self.0 = (self.0 & !(0x07 << 0usize)) | (((val.0 as u32) & 0x07) << 0usize); | 765 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 340 | } | 766 | } |
| 341 | #[doc = "Trigger selection"] | 767 | } |
| 342 | pub const fn ts(&self) -> super::vals::Ts { | 768 | impl Default for SrBasic { |
| 769 | fn default() -> SrBasic { | ||
| 770 | SrBasic(0) | ||
| 771 | } | ||
| 772 | } | ||
| 773 | #[doc = "break and dead-time register"] | ||
| 774 | #[repr(transparent)] | ||
| 775 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 776 | pub struct Bdtr(pub u32); | ||
| 777 | impl Bdtr { | ||
| 778 | #[doc = "Dead-time generator setup"] | ||
| 779 | pub const fn dtg(&self) -> u8 { | ||
| 780 | let val = (self.0 >> 0usize) & 0xff; | ||
| 781 | val as u8 | ||
| 782 | } | ||
| 783 | #[doc = "Dead-time generator setup"] | ||
| 784 | pub fn set_dtg(&mut self, val: u8) { | ||
| 785 | self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); | ||
| 786 | } | ||
| 787 | #[doc = "Lock configuration"] | ||
| 788 | pub const fn lock(&self) -> u8 { | ||
| 789 | let val = (self.0 >> 8usize) & 0x03; | ||
| 790 | val as u8 | ||
| 791 | } | ||
| 792 | #[doc = "Lock configuration"] | ||
| 793 | pub fn set_lock(&mut self, val: u8) { | ||
| 794 | self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize); | ||
| 795 | } | ||
| 796 | #[doc = "Off-state selection for Idle mode"] | ||
| 797 | pub const fn ossi(&self) -> super::vals::Ossi { | ||
| 798 | let val = (self.0 >> 10usize) & 0x01; | ||
| 799 | super::vals::Ossi(val as u8) | ||
| 800 | } | ||
| 801 | #[doc = "Off-state selection for Idle mode"] | ||
| 802 | pub fn set_ossi(&mut self, val: super::vals::Ossi) { | ||
| 803 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); | ||
| 804 | } | ||
| 805 | #[doc = "Off-state selection for Run mode"] | ||
| 806 | pub const fn ossr(&self) -> super::vals::Ossr { | ||
| 807 | let val = (self.0 >> 11usize) & 0x01; | ||
| 808 | super::vals::Ossr(val as u8) | ||
| 809 | } | ||
| 810 | #[doc = "Off-state selection for Run mode"] | ||
| 811 | pub fn set_ossr(&mut self, val: super::vals::Ossr) { | ||
| 812 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize); | ||
| 813 | } | ||
| 814 | #[doc = "Break enable"] | ||
| 815 | pub const fn bke(&self) -> bool { | ||
| 816 | let val = (self.0 >> 12usize) & 0x01; | ||
| 817 | val != 0 | ||
| 818 | } | ||
| 819 | #[doc = "Break enable"] | ||
| 820 | pub fn set_bke(&mut self, val: bool) { | ||
| 821 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); | ||
| 822 | } | ||
| 823 | #[doc = "Break polarity"] | ||
| 824 | pub const fn bkp(&self) -> bool { | ||
| 825 | let val = (self.0 >> 13usize) & 0x01; | ||
| 826 | val != 0 | ||
| 827 | } | ||
| 828 | #[doc = "Break polarity"] | ||
| 829 | pub fn set_bkp(&mut self, val: bool) { | ||
| 830 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); | ||
| 831 | } | ||
| 832 | #[doc = "Automatic output enable"] | ||
| 833 | pub const fn aoe(&self) -> bool { | ||
| 834 | let val = (self.0 >> 14usize) & 0x01; | ||
| 835 | val != 0 | ||
| 836 | } | ||
| 837 | #[doc = "Automatic output enable"] | ||
| 838 | pub fn set_aoe(&mut self, val: bool) { | ||
| 839 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); | ||
| 840 | } | ||
| 841 | #[doc = "Main output enable"] | ||
| 842 | pub const fn moe(&self) -> bool { | ||
| 843 | let val = (self.0 >> 15usize) & 0x01; | ||
| 844 | val != 0 | ||
| 845 | } | ||
| 846 | #[doc = "Main output enable"] | ||
| 847 | pub fn set_moe(&mut self, val: bool) { | ||
| 848 | self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); | ||
| 849 | } | ||
| 850 | } | ||
| 851 | impl Default for Bdtr { | ||
| 852 | fn default() -> Bdtr { | ||
| 853 | Bdtr(0) | ||
| 854 | } | ||
| 855 | } | ||
| 856 | #[doc = "control register 2"] | ||
| 857 | #[repr(transparent)] | ||
| 858 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 859 | pub struct Cr2Gp(pub u32); | ||
| 860 | impl Cr2Gp { | ||
| 861 | #[doc = "Capture/compare DMA selection"] | ||
| 862 | pub const fn ccds(&self) -> super::vals::Ccds { | ||
| 863 | let val = (self.0 >> 3usize) & 0x01; | ||
| 864 | super::vals::Ccds(val as u8) | ||
| 865 | } | ||
| 866 | #[doc = "Capture/compare DMA selection"] | ||
| 867 | pub fn set_ccds(&mut self, val: super::vals::Ccds) { | ||
| 868 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); | ||
| 869 | } | ||
| 870 | #[doc = "Master mode selection"] | ||
| 871 | pub const fn mms(&self) -> super::vals::Mms { | ||
| 343 | let val = (self.0 >> 4usize) & 0x07; | 872 | let val = (self.0 >> 4usize) & 0x07; |
| 344 | super::vals::Ts(val as u8) | 873 | super::vals::Mms(val as u8) |
| 345 | } | 874 | } |
| 346 | #[doc = "Trigger selection"] | 875 | #[doc = "Master mode selection"] |
| 347 | pub fn set_ts(&mut self, val: super::vals::Ts) { | 876 | pub fn set_mms(&mut self, val: super::vals::Mms) { |
| 348 | self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize); | 877 | self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize); |
| 349 | } | 878 | } |
| 350 | #[doc = "Master/Slave mode"] | 879 | #[doc = "TI1 selection"] |
| 351 | pub const fn msm(&self) -> super::vals::Msm { | 880 | pub const fn ti1s(&self) -> super::vals::Tis { |
| 352 | let val = (self.0 >> 7usize) & 0x01; | 881 | let val = (self.0 >> 7usize) & 0x01; |
| 353 | super::vals::Msm(val as u8) | 882 | super::vals::Tis(val as u8) |
| 354 | } | 883 | } |
| 355 | #[doc = "Master/Slave mode"] | 884 | #[doc = "TI1 selection"] |
| 356 | pub fn set_msm(&mut self, val: super::vals::Msm) { | 885 | pub fn set_ti1s(&mut self, val: super::vals::Tis) { |
| 357 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); | 886 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); |
| 358 | } | 887 | } |
| 359 | #[doc = "External trigger filter"] | 888 | } |
| 360 | pub const fn etf(&self) -> super::vals::Etf { | 889 | impl Default for Cr2Gp { |
| 361 | let val = (self.0 >> 8usize) & 0x0f; | 890 | fn default() -> Cr2Gp { |
| 362 | super::vals::Etf(val as u8) | 891 | Cr2Gp(0) |
| 363 | } | 892 | } |
| 364 | #[doc = "External trigger filter"] | 893 | } |
| 365 | pub fn set_etf(&mut self, val: super::vals::Etf) { | 894 | #[doc = "DMA address for full transfer"] |
| 366 | self.0 = (self.0 & !(0x0f << 8usize)) | (((val.0 as u32) & 0x0f) << 8usize); | 895 | #[repr(transparent)] |
| 896 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 897 | pub struct Dmar(pub u32); | ||
| 898 | impl Dmar { | ||
| 899 | #[doc = "DMA register for burst accesses"] | ||
| 900 | pub const fn dmab(&self) -> u16 { | ||
| 901 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 902 | val as u16 | ||
| 367 | } | 903 | } |
| 368 | #[doc = "External trigger prescaler"] | 904 | #[doc = "DMA register for burst accesses"] |
| 369 | pub const fn etps(&self) -> super::vals::Etps { | 905 | pub fn set_dmab(&mut self, val: u16) { |
| 370 | let val = (self.0 >> 12usize) & 0x03; | 906 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); |
| 371 | super::vals::Etps(val as u8) | ||
| 372 | } | 907 | } |
| 373 | #[doc = "External trigger prescaler"] | 908 | } |
| 374 | pub fn set_etps(&mut self, val: super::vals::Etps) { | 909 | impl Default for Dmar { |
| 375 | self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize); | 910 | fn default() -> Dmar { |
| 911 | Dmar(0) | ||
| 376 | } | 912 | } |
| 377 | #[doc = "External clock enable"] | 913 | } |
| 378 | pub const fn ece(&self) -> super::vals::Ece { | 914 | #[doc = "capture/compare mode register 2 (output mode)"] |
| 379 | let val = (self.0 >> 14usize) & 0x01; | 915 | #[repr(transparent)] |
| 380 | super::vals::Ece(val as u8) | 916 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 917 | pub struct CcmrOutput(pub u32); | ||
| 918 | impl CcmrOutput { | ||
| 919 | #[doc = "Capture/Compare 3 selection"] | ||
| 920 | pub fn ccs(&self, n: usize) -> super::vals::CcmrOutputCcs { | ||
| 921 | assert!(n < 2usize); | ||
| 922 | let offs = 0usize + n * 8usize; | ||
| 923 | let val = (self.0 >> offs) & 0x03; | ||
| 924 | super::vals::CcmrOutputCcs(val as u8) | ||
| 381 | } | 925 | } |
| 382 | #[doc = "External clock enable"] | 926 | #[doc = "Capture/Compare 3 selection"] |
| 383 | pub fn set_ece(&mut self, val: super::vals::Ece) { | 927 | pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrOutputCcs) { |
| 384 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); | 928 | assert!(n < 2usize); |
| 929 | let offs = 0usize + n * 8usize; | ||
| 930 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 385 | } | 931 | } |
| 386 | #[doc = "External trigger polarity"] | 932 | #[doc = "Output compare 3 fast enable"] |
| 387 | pub const fn etp(&self) -> super::vals::Etp { | 933 | pub fn ocfe(&self, n: usize) -> bool { |
| 388 | let val = (self.0 >> 15usize) & 0x01; | 934 | assert!(n < 2usize); |
| 389 | super::vals::Etp(val as u8) | 935 | let offs = 2usize + n * 8usize; |
| 936 | let val = (self.0 >> offs) & 0x01; | ||
| 937 | val != 0 | ||
| 390 | } | 938 | } |
| 391 | #[doc = "External trigger polarity"] | 939 | #[doc = "Output compare 3 fast enable"] |
| 392 | pub fn set_etp(&mut self, val: super::vals::Etp) { | 940 | pub fn set_ocfe(&mut self, n: usize, val: bool) { |
| 393 | self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize); | 941 | assert!(n < 2usize); |
| 942 | let offs = 2usize + n * 8usize; | ||
| 943 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 944 | } | ||
| 945 | #[doc = "Output compare 3 preload enable"] | ||
| 946 | pub fn ocpe(&self, n: usize) -> super::vals::Ocpe { | ||
| 947 | assert!(n < 2usize); | ||
| 948 | let offs = 3usize + n * 8usize; | ||
| 949 | let val = (self.0 >> offs) & 0x01; | ||
| 950 | super::vals::Ocpe(val as u8) | ||
| 951 | } | ||
| 952 | #[doc = "Output compare 3 preload enable"] | ||
| 953 | pub fn set_ocpe(&mut self, n: usize, val: super::vals::Ocpe) { | ||
| 954 | assert!(n < 2usize); | ||
| 955 | let offs = 3usize + n * 8usize; | ||
| 956 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 957 | } | ||
| 958 | #[doc = "Output compare 3 mode"] | ||
| 959 | pub fn ocm(&self, n: usize) -> super::vals::Ocm { | ||
| 960 | assert!(n < 2usize); | ||
| 961 | let offs = 4usize + n * 8usize; | ||
| 962 | let val = (self.0 >> offs) & 0x07; | ||
| 963 | super::vals::Ocm(val as u8) | ||
| 964 | } | ||
| 965 | #[doc = "Output compare 3 mode"] | ||
| 966 | pub fn set_ocm(&mut self, n: usize, val: super::vals::Ocm) { | ||
| 967 | assert!(n < 2usize); | ||
| 968 | let offs = 4usize + n * 8usize; | ||
| 969 | self.0 = (self.0 & !(0x07 << offs)) | (((val.0 as u32) & 0x07) << offs); | ||
| 970 | } | ||
| 971 | #[doc = "Output compare 3 clear enable"] | ||
| 972 | pub fn occe(&self, n: usize) -> bool { | ||
| 973 | assert!(n < 2usize); | ||
| 974 | let offs = 7usize + n * 8usize; | ||
| 975 | let val = (self.0 >> offs) & 0x01; | ||
| 976 | val != 0 | ||
| 977 | } | ||
| 978 | #[doc = "Output compare 3 clear enable"] | ||
| 979 | pub fn set_occe(&mut self, n: usize, val: bool) { | ||
| 980 | assert!(n < 2usize); | ||
| 981 | let offs = 7usize + n * 8usize; | ||
| 982 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 394 | } | 983 | } |
| 395 | } | 984 | } |
| 396 | impl Default for Smcr { | 985 | impl Default for CcmrOutput { |
| 397 | fn default() -> Smcr { | 986 | fn default() -> CcmrOutput { |
| 398 | Smcr(0) | 987 | CcmrOutput(0) |
| 399 | } | 988 | } |
| 400 | } | 989 | } |
| 401 | #[doc = "auto-reload register"] | 990 | #[doc = "prescaler"] |
| 402 | #[repr(transparent)] | 991 | #[repr(transparent)] |
| 403 | #[derive(Copy, Clone, Eq, PartialEq)] | 992 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 404 | pub struct Arr32(pub u32); | 993 | pub struct Psc(pub u32); |
| 405 | impl Arr32 { | 994 | impl Psc { |
| 406 | #[doc = "Auto-reload value"] | 995 | #[doc = "Prescaler value"] |
| 407 | pub const fn arr(&self) -> u32 { | 996 | pub const fn psc(&self) -> u16 { |
| 408 | let val = (self.0 >> 0usize) & 0xffff_ffff; | 997 | let val = (self.0 >> 0usize) & 0xffff; |
| 409 | val as u32 | 998 | val as u16 |
| 410 | } | 999 | } |
| 411 | #[doc = "Auto-reload value"] | 1000 | #[doc = "Prescaler value"] |
| 412 | pub fn set_arr(&mut self, val: u32) { | 1001 | pub fn set_psc(&mut self, val: u16) { |
| 413 | self.0 = | 1002 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); |
| 414 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 415 | } | 1003 | } |
| 416 | } | 1004 | } |
| 417 | impl Default for Arr32 { | 1005 | impl Default for Psc { |
| 418 | fn default() -> Arr32 { | 1006 | fn default() -> Psc { |
| 419 | Arr32(0) | 1007 | Psc(0) |
| 420 | } | 1008 | } |
| 421 | } | 1009 | } |
| 422 | #[doc = "DMA/Interrupt enable register"] | 1010 | #[doc = "DMA/Interrupt enable register"] |
| @@ -492,11 +1080,81 @@ pub mod timer_v1 { | |||
| 492 | DierGp(0) | 1080 | DierGp(0) |
| 493 | } | 1081 | } |
| 494 | } | 1082 | } |
| 1083 | #[doc = "capture/compare enable register"] | ||
| 1084 | #[repr(transparent)] | ||
| 1085 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 1086 | pub struct CcerGp(pub u32); | ||
| 1087 | impl CcerGp { | ||
| 1088 | #[doc = "Capture/Compare 1 output enable"] | ||
| 1089 | pub fn cce(&self, n: usize) -> bool { | ||
| 1090 | assert!(n < 4usize); | ||
| 1091 | let offs = 0usize + n * 4usize; | ||
| 1092 | let val = (self.0 >> offs) & 0x01; | ||
| 1093 | val != 0 | ||
| 1094 | } | ||
| 1095 | #[doc = "Capture/Compare 1 output enable"] | ||
| 1096 | pub fn set_cce(&mut self, n: usize, val: bool) { | ||
| 1097 | assert!(n < 4usize); | ||
| 1098 | let offs = 0usize + n * 4usize; | ||
| 1099 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 1100 | } | ||
| 1101 | #[doc = "Capture/Compare 1 output Polarity"] | ||
| 1102 | pub fn ccp(&self, n: usize) -> bool { | ||
| 1103 | assert!(n < 4usize); | ||
| 1104 | let offs = 1usize + n * 4usize; | ||
| 1105 | let val = (self.0 >> offs) & 0x01; | ||
| 1106 | val != 0 | ||
| 1107 | } | ||
| 1108 | #[doc = "Capture/Compare 1 output Polarity"] | ||
| 1109 | pub fn set_ccp(&mut self, n: usize, val: bool) { | ||
| 1110 | assert!(n < 4usize); | ||
| 1111 | let offs = 1usize + n * 4usize; | ||
| 1112 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 1113 | } | ||
| 1114 | #[doc = "Capture/Compare 1 output Polarity"] | ||
| 1115 | pub fn ccnp(&self, n: usize) -> bool { | ||
| 1116 | assert!(n < 4usize); | ||
| 1117 | let offs = 3usize + n * 4usize; | ||
| 1118 | let val = (self.0 >> offs) & 0x01; | ||
| 1119 | val != 0 | ||
| 1120 | } | ||
| 1121 | #[doc = "Capture/Compare 1 output Polarity"] | ||
| 1122 | pub fn set_ccnp(&mut self, n: usize, val: bool) { | ||
| 1123 | assert!(n < 4usize); | ||
| 1124 | let offs = 3usize + n * 4usize; | ||
| 1125 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 1126 | } | ||
| 1127 | } | ||
| 1128 | impl Default for CcerGp { | ||
| 1129 | fn default() -> CcerGp { | ||
| 1130 | CcerGp(0) | ||
| 1131 | } | ||
| 1132 | } | ||
| 1133 | #[doc = "event generation register"] | ||
| 1134 | #[repr(transparent)] | ||
| 1135 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 1136 | pub struct EgrBasic(pub u32); | ||
| 1137 | impl EgrBasic { | ||
| 1138 | #[doc = "Update generation"] | ||
| 1139 | pub const fn ug(&self) -> bool { | ||
| 1140 | let val = (self.0 >> 0usize) & 0x01; | ||
| 1141 | val != 0 | ||
| 1142 | } | ||
| 1143 | #[doc = "Update generation"] | ||
| 1144 | pub fn set_ug(&mut self, val: bool) { | ||
| 1145 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 1146 | } | ||
| 1147 | } | ||
| 1148 | impl Default for EgrBasic { | ||
| 1149 | fn default() -> EgrBasic { | ||
| 1150 | EgrBasic(0) | ||
| 1151 | } | ||
| 1152 | } | ||
| 495 | #[doc = "control register 1"] | 1153 | #[doc = "control register 1"] |
| 496 | #[repr(transparent)] | 1154 | #[repr(transparent)] |
| 497 | #[derive(Copy, Clone, Eq, PartialEq)] | 1155 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 498 | pub struct Cr1Basic(pub u32); | 1156 | pub struct Cr1Gp(pub u32); |
| 499 | impl Cr1Basic { | 1157 | impl Cr1Gp { |
| 500 | #[doc = "Counter enable"] | 1158 | #[doc = "Counter enable"] |
| 501 | pub const fn cen(&self) -> bool { | 1159 | pub const fn cen(&self) -> bool { |
| 502 | let val = (self.0 >> 0usize) & 0x01; | 1160 | let val = (self.0 >> 0usize) & 0x01; |
| @@ -533,6 +1191,24 @@ pub mod timer_v1 { | |||
| 533 | pub fn set_opm(&mut self, val: super::vals::Opm) { | 1191 | pub fn set_opm(&mut self, val: super::vals::Opm) { |
| 534 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); | 1192 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); |
| 535 | } | 1193 | } |
| 1194 | #[doc = "Direction"] | ||
| 1195 | pub const fn dir(&self) -> super::vals::Dir { | ||
| 1196 | let val = (self.0 >> 4usize) & 0x01; | ||
| 1197 | super::vals::Dir(val as u8) | ||
| 1198 | } | ||
| 1199 | #[doc = "Direction"] | ||
| 1200 | pub fn set_dir(&mut self, val: super::vals::Dir) { | ||
| 1201 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize); | ||
| 1202 | } | ||
| 1203 | #[doc = "Center-aligned mode selection"] | ||
| 1204 | pub const fn cms(&self) -> super::vals::Cms { | ||
| 1205 | let val = (self.0 >> 5usize) & 0x03; | ||
| 1206 | super::vals::Cms(val as u8) | ||
| 1207 | } | ||
| 1208 | #[doc = "Center-aligned mode selection"] | ||
| 1209 | pub fn set_cms(&mut self, val: super::vals::Cms) { | ||
| 1210 | self.0 = (self.0 & !(0x03 << 5usize)) | (((val.0 as u32) & 0x03) << 5usize); | ||
| 1211 | } | ||
| 536 | #[doc = "Auto-reload preload enable"] | 1212 | #[doc = "Auto-reload preload enable"] |
| 537 | pub const fn arpe(&self) -> super::vals::Arpe { | 1213 | pub const fn arpe(&self) -> super::vals::Arpe { |
| 538 | let val = (self.0 >> 7usize) & 0x01; | 1214 | let val = (self.0 >> 7usize) & 0x01; |
| @@ -542,51 +1218,19 @@ pub mod timer_v1 { | |||
| 542 | pub fn set_arpe(&mut self, val: super::vals::Arpe) { | 1218 | pub fn set_arpe(&mut self, val: super::vals::Arpe) { |
| 543 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); | 1219 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); |
| 544 | } | 1220 | } |
| 545 | } | 1221 | #[doc = "Clock division"] |
| 546 | impl Default for Cr1Basic { | 1222 | pub const fn ckd(&self) -> super::vals::Ckd { |
| 547 | fn default() -> Cr1Basic { | 1223 | let val = (self.0 >> 8usize) & 0x03; |
| 548 | Cr1Basic(0) | 1224 | super::vals::Ckd(val as u8) |
| 549 | } | ||
| 550 | } | ||
| 551 | #[doc = "capture/compare register 1"] | ||
| 552 | #[repr(transparent)] | ||
| 553 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 554 | pub struct Ccr32(pub u32); | ||
| 555 | impl Ccr32 { | ||
| 556 | #[doc = "Capture/Compare 1 value"] | ||
| 557 | pub const fn ccr(&self) -> u32 { | ||
| 558 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 559 | val as u32 | ||
| 560 | } | ||
| 561 | #[doc = "Capture/Compare 1 value"] | ||
| 562 | pub fn set_ccr(&mut self, val: u32) { | ||
| 563 | self.0 = | ||
| 564 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 565 | } | ||
| 566 | } | ||
| 567 | impl Default for Ccr32 { | ||
| 568 | fn default() -> Ccr32 { | ||
| 569 | Ccr32(0) | ||
| 570 | } | ||
| 571 | } | ||
| 572 | #[doc = "DMA address for full transfer"] | ||
| 573 | #[repr(transparent)] | ||
| 574 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 575 | pub struct Dmar(pub u32); | ||
| 576 | impl Dmar { | ||
| 577 | #[doc = "DMA register for burst accesses"] | ||
| 578 | pub const fn dmab(&self) -> u16 { | ||
| 579 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 580 | val as u16 | ||
| 581 | } | 1225 | } |
| 582 | #[doc = "DMA register for burst accesses"] | 1226 | #[doc = "Clock division"] |
| 583 | pub fn set_dmab(&mut self, val: u16) { | 1227 | pub fn set_ckd(&mut self, val: super::vals::Ckd) { |
| 584 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | 1228 | self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize); |
| 585 | } | 1229 | } |
| 586 | } | 1230 | } |
| 587 | impl Default for Dmar { | 1231 | impl Default for Cr1Gp { |
| 588 | fn default() -> Dmar { | 1232 | fn default() -> Cr1Gp { |
| 589 | Dmar(0) | 1233 | Cr1Gp(0) |
| 590 | } | 1234 | } |
| 591 | } | 1235 | } |
| 592 | #[doc = "counter"] | 1236 | #[doc = "counter"] |
| @@ -612,79 +1256,6 @@ pub mod timer_v1 { | |||
| 612 | #[doc = "status register"] | 1256 | #[doc = "status register"] |
| 613 | #[repr(transparent)] | 1257 | #[repr(transparent)] |
| 614 | #[derive(Copy, Clone, Eq, PartialEq)] | 1258 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 615 | pub struct SrGp(pub u32); | ||
| 616 | impl SrGp { | ||
| 617 | #[doc = "Update interrupt flag"] | ||
| 618 | pub const fn uif(&self) -> bool { | ||
| 619 | let val = (self.0 >> 0usize) & 0x01; | ||
| 620 | val != 0 | ||
| 621 | } | ||
| 622 | #[doc = "Update interrupt flag"] | ||
| 623 | pub fn set_uif(&mut self, val: bool) { | ||
| 624 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 625 | } | ||
| 626 | #[doc = "Capture/compare 1 interrupt flag"] | ||
| 627 | pub fn ccif(&self, n: usize) -> bool { | ||
| 628 | assert!(n < 4usize); | ||
| 629 | let offs = 1usize + n * 1usize; | ||
| 630 | let val = (self.0 >> offs) & 0x01; | ||
| 631 | val != 0 | ||
| 632 | } | ||
| 633 | #[doc = "Capture/compare 1 interrupt flag"] | ||
| 634 | pub fn set_ccif(&mut self, n: usize, val: bool) { | ||
| 635 | assert!(n < 4usize); | ||
| 636 | let offs = 1usize + n * 1usize; | ||
| 637 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 638 | } | ||
| 639 | #[doc = "COM interrupt flag"] | ||
| 640 | pub const fn comif(&self) -> bool { | ||
| 641 | let val = (self.0 >> 5usize) & 0x01; | ||
| 642 | val != 0 | ||
| 643 | } | ||
| 644 | #[doc = "COM interrupt flag"] | ||
| 645 | pub fn set_comif(&mut self, val: bool) { | ||
| 646 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | ||
| 647 | } | ||
| 648 | #[doc = "Trigger interrupt flag"] | ||
| 649 | pub const fn tif(&self) -> bool { | ||
| 650 | let val = (self.0 >> 6usize) & 0x01; | ||
| 651 | val != 0 | ||
| 652 | } | ||
| 653 | #[doc = "Trigger interrupt flag"] | ||
| 654 | pub fn set_tif(&mut self, val: bool) { | ||
| 655 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | ||
| 656 | } | ||
| 657 | #[doc = "Break interrupt flag"] | ||
| 658 | pub const fn bif(&self) -> bool { | ||
| 659 | let val = (self.0 >> 7usize) & 0x01; | ||
| 660 | val != 0 | ||
| 661 | } | ||
| 662 | #[doc = "Break interrupt flag"] | ||
| 663 | pub fn set_bif(&mut self, val: bool) { | ||
| 664 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 665 | } | ||
| 666 | #[doc = "Capture/Compare 1 overcapture flag"] | ||
| 667 | pub fn ccof(&self, n: usize) -> bool { | ||
| 668 | assert!(n < 4usize); | ||
| 669 | let offs = 9usize + n * 1usize; | ||
| 670 | let val = (self.0 >> offs) & 0x01; | ||
| 671 | val != 0 | ||
| 672 | } | ||
| 673 | #[doc = "Capture/Compare 1 overcapture flag"] | ||
| 674 | pub fn set_ccof(&mut self, n: usize, val: bool) { | ||
| 675 | assert!(n < 4usize); | ||
| 676 | let offs = 9usize + n * 1usize; | ||
| 677 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 678 | } | ||
| 679 | } | ||
| 680 | impl Default for SrGp { | ||
| 681 | fn default() -> SrGp { | ||
| 682 | SrGp(0) | ||
| 683 | } | ||
| 684 | } | ||
| 685 | #[doc = "status register"] | ||
| 686 | #[repr(transparent)] | ||
| 687 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 688 | pub struct SrAdv(pub u32); | 1259 | pub struct SrAdv(pub u32); |
| 689 | impl SrAdv { | 1260 | impl SrAdv { |
| 690 | #[doc = "Update interrupt flag"] | 1261 | #[doc = "Update interrupt flag"] |
| @@ -755,66 +1326,6 @@ pub mod timer_v1 { | |||
| 755 | SrAdv(0) | 1326 | SrAdv(0) |
| 756 | } | 1327 | } |
| 757 | } | 1328 | } |
| 758 | #[doc = "event generation register"] | ||
| 759 | #[repr(transparent)] | ||
| 760 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 761 | pub struct EgrGp(pub u32); | ||
| 762 | impl EgrGp { | ||
| 763 | #[doc = "Update generation"] | ||
| 764 | pub const fn ug(&self) -> bool { | ||
| 765 | let val = (self.0 >> 0usize) & 0x01; | ||
| 766 | val != 0 | ||
| 767 | } | ||
| 768 | #[doc = "Update generation"] | ||
| 769 | pub fn set_ug(&mut self, val: bool) { | ||
| 770 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 771 | } | ||
| 772 | #[doc = "Capture/compare 1 generation"] | ||
| 773 | pub fn ccg(&self, n: usize) -> bool { | ||
| 774 | assert!(n < 4usize); | ||
| 775 | let offs = 1usize + n * 1usize; | ||
| 776 | let val = (self.0 >> offs) & 0x01; | ||
| 777 | val != 0 | ||
| 778 | } | ||
| 779 | #[doc = "Capture/compare 1 generation"] | ||
| 780 | pub fn set_ccg(&mut self, n: usize, val: bool) { | ||
| 781 | assert!(n < 4usize); | ||
| 782 | let offs = 1usize + n * 1usize; | ||
| 783 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 784 | } | ||
| 785 | #[doc = "Capture/Compare control update generation"] | ||
| 786 | pub const fn comg(&self) -> bool { | ||
| 787 | let val = (self.0 >> 5usize) & 0x01; | ||
| 788 | val != 0 | ||
| 789 | } | ||
| 790 | #[doc = "Capture/Compare control update generation"] | ||
| 791 | pub fn set_comg(&mut self, val: bool) { | ||
| 792 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | ||
| 793 | } | ||
| 794 | #[doc = "Trigger generation"] | ||
| 795 | pub const fn tg(&self) -> bool { | ||
| 796 | let val = (self.0 >> 6usize) & 0x01; | ||
| 797 | val != 0 | ||
| 798 | } | ||
| 799 | #[doc = "Trigger generation"] | ||
| 800 | pub fn set_tg(&mut self, val: bool) { | ||
| 801 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | ||
| 802 | } | ||
| 803 | #[doc = "Break generation"] | ||
| 804 | pub const fn bg(&self) -> bool { | ||
| 805 | let val = (self.0 >> 7usize) & 0x01; | ||
| 806 | val != 0 | ||
| 807 | } | ||
| 808 | #[doc = "Break generation"] | ||
| 809 | pub fn set_bg(&mut self, val: bool) { | ||
| 810 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 811 | } | ||
| 812 | } | ||
| 813 | impl Default for EgrGp { | ||
| 814 | fn default() -> EgrGp { | ||
| 815 | EgrGp(0) | ||
| 816 | } | ||
| 817 | } | ||
| 818 | #[doc = "counter"] | 1329 | #[doc = "counter"] |
| 819 | #[repr(transparent)] | 1330 | #[repr(transparent)] |
| 820 | #[derive(Copy, Clone, Eq, PartialEq)] | 1331 | #[derive(Copy, Clone, Eq, PartialEq)] |
| @@ -836,134 +1347,78 @@ pub mod timer_v1 { | |||
| 836 | Cnt32(0) | 1347 | Cnt32(0) |
| 837 | } | 1348 | } |
| 838 | } | 1349 | } |
| 839 | #[doc = "event generation register"] | 1350 | #[doc = "slave mode control register"] |
| 840 | #[repr(transparent)] | 1351 | #[repr(transparent)] |
| 841 | #[derive(Copy, Clone, Eq, PartialEq)] | 1352 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 842 | pub struct EgrAdv(pub u32); | 1353 | pub struct Smcr(pub u32); |
| 843 | impl EgrAdv { | 1354 | impl Smcr { |
| 844 | #[doc = "Update generation"] | 1355 | #[doc = "Slave mode selection"] |
| 845 | pub const fn ug(&self) -> bool { | 1356 | pub const fn sms(&self) -> super::vals::Sms { |
| 846 | let val = (self.0 >> 0usize) & 0x01; | 1357 | let val = (self.0 >> 0usize) & 0x07; |
| 847 | val != 0 | 1358 | super::vals::Sms(val as u8) |
| 848 | } | ||
| 849 | #[doc = "Update generation"] | ||
| 850 | pub fn set_ug(&mut self, val: bool) { | ||
| 851 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 852 | } | ||
| 853 | #[doc = "Capture/compare 1 generation"] | ||
| 854 | pub fn ccg(&self, n: usize) -> bool { | ||
| 855 | assert!(n < 4usize); | ||
| 856 | let offs = 1usize + n * 1usize; | ||
| 857 | let val = (self.0 >> offs) & 0x01; | ||
| 858 | val != 0 | ||
| 859 | } | ||
| 860 | #[doc = "Capture/compare 1 generation"] | ||
| 861 | pub fn set_ccg(&mut self, n: usize, val: bool) { | ||
| 862 | assert!(n < 4usize); | ||
| 863 | let offs = 1usize + n * 1usize; | ||
| 864 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 865 | } | ||
| 866 | #[doc = "Capture/Compare control update generation"] | ||
| 867 | pub const fn comg(&self) -> bool { | ||
| 868 | let val = (self.0 >> 5usize) & 0x01; | ||
| 869 | val != 0 | ||
| 870 | } | 1359 | } |
| 871 | #[doc = "Capture/Compare control update generation"] | 1360 | #[doc = "Slave mode selection"] |
| 872 | pub fn set_comg(&mut self, val: bool) { | 1361 | pub fn set_sms(&mut self, val: super::vals::Sms) { |
| 873 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | 1362 | self.0 = (self.0 & !(0x07 << 0usize)) | (((val.0 as u32) & 0x07) << 0usize); |
| 874 | } | 1363 | } |
| 875 | #[doc = "Trigger generation"] | 1364 | #[doc = "Trigger selection"] |
| 876 | pub const fn tg(&self) -> bool { | 1365 | pub const fn ts(&self) -> super::vals::Ts { |
| 877 | let val = (self.0 >> 6usize) & 0x01; | 1366 | let val = (self.0 >> 4usize) & 0x07; |
| 878 | val != 0 | 1367 | super::vals::Ts(val as u8) |
| 879 | } | 1368 | } |
| 880 | #[doc = "Trigger generation"] | 1369 | #[doc = "Trigger selection"] |
| 881 | pub fn set_tg(&mut self, val: bool) { | 1370 | pub fn set_ts(&mut self, val: super::vals::Ts) { |
| 882 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 1371 | self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize); |
| 883 | } | 1372 | } |
| 884 | #[doc = "Break generation"] | 1373 | #[doc = "Master/Slave mode"] |
| 885 | pub const fn bg(&self) -> bool { | 1374 | pub const fn msm(&self) -> super::vals::Msm { |
| 886 | let val = (self.0 >> 7usize) & 0x01; | 1375 | let val = (self.0 >> 7usize) & 0x01; |
| 887 | val != 0 | 1376 | super::vals::Msm(val as u8) |
| 888 | } | ||
| 889 | #[doc = "Break generation"] | ||
| 890 | pub fn set_bg(&mut self, val: bool) { | ||
| 891 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 892 | } | ||
| 893 | } | ||
| 894 | impl Default for EgrAdv { | ||
| 895 | fn default() -> EgrAdv { | ||
| 896 | EgrAdv(0) | ||
| 897 | } | 1377 | } |
| 898 | } | 1378 | #[doc = "Master/Slave mode"] |
| 899 | #[doc = "control register 2"] | 1379 | pub fn set_msm(&mut self, val: super::vals::Msm) { |
| 900 | #[repr(transparent)] | 1380 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); |
| 901 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 902 | pub struct Cr2Basic(pub u32); | ||
| 903 | impl Cr2Basic { | ||
| 904 | #[doc = "Master mode selection"] | ||
| 905 | pub const fn mms(&self) -> super::vals::Mms { | ||
| 906 | let val = (self.0 >> 4usize) & 0x07; | ||
| 907 | super::vals::Mms(val as u8) | ||
| 908 | } | 1381 | } |
| 909 | #[doc = "Master mode selection"] | 1382 | #[doc = "External trigger filter"] |
| 910 | pub fn set_mms(&mut self, val: super::vals::Mms) { | 1383 | pub const fn etf(&self) -> super::vals::Etf { |
| 911 | self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize); | 1384 | let val = (self.0 >> 8usize) & 0x0f; |
| 1385 | super::vals::Etf(val as u8) | ||
| 912 | } | 1386 | } |
| 913 | } | 1387 | #[doc = "External trigger filter"] |
| 914 | impl Default for Cr2Basic { | 1388 | pub fn set_etf(&mut self, val: super::vals::Etf) { |
| 915 | fn default() -> Cr2Basic { | 1389 | self.0 = (self.0 & !(0x0f << 8usize)) | (((val.0 as u32) & 0x0f) << 8usize); |
| 916 | Cr2Basic(0) | ||
| 917 | } | 1390 | } |
| 918 | } | 1391 | #[doc = "External trigger prescaler"] |
| 919 | #[doc = "capture/compare mode register 1 (input mode)"] | 1392 | pub const fn etps(&self) -> super::vals::Etps { |
| 920 | #[repr(transparent)] | 1393 | let val = (self.0 >> 12usize) & 0x03; |
| 921 | #[derive(Copy, Clone, Eq, PartialEq)] | 1394 | super::vals::Etps(val as u8) |
| 922 | pub struct CcmrInput(pub u32); | ||
| 923 | impl CcmrInput { | ||
| 924 | #[doc = "Capture/Compare 1 selection"] | ||
| 925 | pub fn ccs(&self, n: usize) -> super::vals::CcmrInputCcs { | ||
| 926 | assert!(n < 2usize); | ||
| 927 | let offs = 0usize + n * 8usize; | ||
| 928 | let val = (self.0 >> offs) & 0x03; | ||
| 929 | super::vals::CcmrInputCcs(val as u8) | ||
| 930 | } | 1395 | } |
| 931 | #[doc = "Capture/Compare 1 selection"] | 1396 | #[doc = "External trigger prescaler"] |
| 932 | pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrInputCcs) { | 1397 | pub fn set_etps(&mut self, val: super::vals::Etps) { |
| 933 | assert!(n < 2usize); | 1398 | self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize); |
| 934 | let offs = 0usize + n * 8usize; | ||
| 935 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 936 | } | 1399 | } |
| 937 | #[doc = "Input capture 1 prescaler"] | 1400 | #[doc = "External clock enable"] |
| 938 | pub fn icpsc(&self, n: usize) -> u8 { | 1401 | pub const fn ece(&self) -> super::vals::Ece { |
| 939 | assert!(n < 2usize); | 1402 | let val = (self.0 >> 14usize) & 0x01; |
| 940 | let offs = 2usize + n * 8usize; | 1403 | super::vals::Ece(val as u8) |
| 941 | let val = (self.0 >> offs) & 0x03; | ||
| 942 | val as u8 | ||
| 943 | } | 1404 | } |
| 944 | #[doc = "Input capture 1 prescaler"] | 1405 | #[doc = "External clock enable"] |
| 945 | pub fn set_icpsc(&mut self, n: usize, val: u8) { | 1406 | pub fn set_ece(&mut self, val: super::vals::Ece) { |
| 946 | assert!(n < 2usize); | 1407 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); |
| 947 | let offs = 2usize + n * 8usize; | ||
| 948 | self.0 = (self.0 & !(0x03 << offs)) | (((val as u32) & 0x03) << offs); | ||
| 949 | } | 1408 | } |
| 950 | #[doc = "Input capture 1 filter"] | 1409 | #[doc = "External trigger polarity"] |
| 951 | pub fn icf(&self, n: usize) -> super::vals::Icf { | 1410 | pub const fn etp(&self) -> super::vals::Etp { |
| 952 | assert!(n < 2usize); | 1411 | let val = (self.0 >> 15usize) & 0x01; |
| 953 | let offs = 4usize + n * 8usize; | 1412 | super::vals::Etp(val as u8) |
| 954 | let val = (self.0 >> offs) & 0x0f; | ||
| 955 | super::vals::Icf(val as u8) | ||
| 956 | } | 1413 | } |
| 957 | #[doc = "Input capture 1 filter"] | 1414 | #[doc = "External trigger polarity"] |
| 958 | pub fn set_icf(&mut self, n: usize, val: super::vals::Icf) { | 1415 | pub fn set_etp(&mut self, val: super::vals::Etp) { |
| 959 | assert!(n < 2usize); | 1416 | self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize); |
| 960 | let offs = 4usize + n * 8usize; | ||
| 961 | self.0 = (self.0 & !(0x0f << offs)) | (((val.0 as u32) & 0x0f) << offs); | ||
| 962 | } | 1417 | } |
| 963 | } | 1418 | } |
| 964 | impl Default for CcmrInput { | 1419 | impl Default for Smcr { |
| 965 | fn default() -> CcmrInput { | 1420 | fn default() -> Smcr { |
| 966 | CcmrInput(0) | 1421 | Smcr(0) |
| 967 | } | 1422 | } |
| 968 | } | 1423 | } |
| 969 | #[doc = "control register 2"] | 1424 | #[doc = "control register 2"] |
| @@ -1062,153 +1517,264 @@ pub mod timer_v1 { | |||
| 1062 | Cr2Adv(0) | 1517 | Cr2Adv(0) |
| 1063 | } | 1518 | } |
| 1064 | } | 1519 | } |
| 1065 | #[doc = "capture/compare enable register"] | 1520 | #[doc = "DMA control register"] |
| 1066 | #[repr(transparent)] | 1521 | #[repr(transparent)] |
| 1067 | #[derive(Copy, Clone, Eq, PartialEq)] | 1522 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 1068 | pub struct CcerGp(pub u32); | 1523 | pub struct Dcr(pub u32); |
| 1069 | impl CcerGp { | 1524 | impl Dcr { |
| 1070 | #[doc = "Capture/Compare 1 output enable"] | 1525 | #[doc = "DMA base address"] |
| 1071 | pub fn cce(&self, n: usize) -> bool { | 1526 | pub const fn dba(&self) -> u8 { |
| 1072 | assert!(n < 4usize); | 1527 | let val = (self.0 >> 0usize) & 0x1f; |
| 1073 | let offs = 0usize + n * 4usize; | 1528 | val as u8 |
| 1074 | let val = (self.0 >> offs) & 0x01; | 1529 | } |
| 1530 | #[doc = "DMA base address"] | ||
| 1531 | pub fn set_dba(&mut self, val: u8) { | ||
| 1532 | self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); | ||
| 1533 | } | ||
| 1534 | #[doc = "DMA burst length"] | ||
| 1535 | pub const fn dbl(&self) -> u8 { | ||
| 1536 | let val = (self.0 >> 8usize) & 0x1f; | ||
| 1537 | val as u8 | ||
| 1538 | } | ||
| 1539 | #[doc = "DMA burst length"] | ||
| 1540 | pub fn set_dbl(&mut self, val: u8) { | ||
| 1541 | self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize); | ||
| 1542 | } | ||
| 1543 | } | ||
| 1544 | impl Default for Dcr { | ||
| 1545 | fn default() -> Dcr { | ||
| 1546 | Dcr(0) | ||
| 1547 | } | ||
| 1548 | } | ||
| 1549 | #[doc = "capture/compare mode register 1 (input mode)"] | ||
| 1550 | #[repr(transparent)] | ||
| 1551 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 1552 | pub struct CcmrInput(pub u32); | ||
| 1553 | impl CcmrInput { | ||
| 1554 | #[doc = "Capture/Compare 1 selection"] | ||
| 1555 | pub fn ccs(&self, n: usize) -> super::vals::CcmrInputCcs { | ||
| 1556 | assert!(n < 2usize); | ||
| 1557 | let offs = 0usize + n * 8usize; | ||
| 1558 | let val = (self.0 >> offs) & 0x03; | ||
| 1559 | super::vals::CcmrInputCcs(val as u8) | ||
| 1560 | } | ||
| 1561 | #[doc = "Capture/Compare 1 selection"] | ||
| 1562 | pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrInputCcs) { | ||
| 1563 | assert!(n < 2usize); | ||
| 1564 | let offs = 0usize + n * 8usize; | ||
| 1565 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 1566 | } | ||
| 1567 | #[doc = "Input capture 1 prescaler"] | ||
| 1568 | pub fn icpsc(&self, n: usize) -> u8 { | ||
| 1569 | assert!(n < 2usize); | ||
| 1570 | let offs = 2usize + n * 8usize; | ||
| 1571 | let val = (self.0 >> offs) & 0x03; | ||
| 1572 | val as u8 | ||
| 1573 | } | ||
| 1574 | #[doc = "Input capture 1 prescaler"] | ||
| 1575 | pub fn set_icpsc(&mut self, n: usize, val: u8) { | ||
| 1576 | assert!(n < 2usize); | ||
| 1577 | let offs = 2usize + n * 8usize; | ||
| 1578 | self.0 = (self.0 & !(0x03 << offs)) | (((val as u32) & 0x03) << offs); | ||
| 1579 | } | ||
| 1580 | #[doc = "Input capture 1 filter"] | ||
| 1581 | pub fn icf(&self, n: usize) -> super::vals::Icf { | ||
| 1582 | assert!(n < 2usize); | ||
| 1583 | let offs = 4usize + n * 8usize; | ||
| 1584 | let val = (self.0 >> offs) & 0x0f; | ||
| 1585 | super::vals::Icf(val as u8) | ||
| 1586 | } | ||
| 1587 | #[doc = "Input capture 1 filter"] | ||
| 1588 | pub fn set_icf(&mut self, n: usize, val: super::vals::Icf) { | ||
| 1589 | assert!(n < 2usize); | ||
| 1590 | let offs = 4usize + n * 8usize; | ||
| 1591 | self.0 = (self.0 & !(0x0f << offs)) | (((val.0 as u32) & 0x0f) << offs); | ||
| 1592 | } | ||
| 1593 | } | ||
| 1594 | impl Default for CcmrInput { | ||
| 1595 | fn default() -> CcmrInput { | ||
| 1596 | CcmrInput(0) | ||
| 1597 | } | ||
| 1598 | } | ||
| 1599 | #[doc = "status register"] | ||
| 1600 | #[repr(transparent)] | ||
| 1601 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 1602 | pub struct SrGp(pub u32); | ||
| 1603 | impl SrGp { | ||
| 1604 | #[doc = "Update interrupt flag"] | ||
| 1605 | pub const fn uif(&self) -> bool { | ||
| 1606 | let val = (self.0 >> 0usize) & 0x01; | ||
| 1075 | val != 0 | 1607 | val != 0 |
| 1076 | } | 1608 | } |
| 1077 | #[doc = "Capture/Compare 1 output enable"] | 1609 | #[doc = "Update interrupt flag"] |
| 1078 | pub fn set_cce(&mut self, n: usize, val: bool) { | 1610 | pub fn set_uif(&mut self, val: bool) { |
| 1079 | assert!(n < 4usize); | 1611 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 1080 | let offs = 0usize + n * 4usize; | ||
| 1081 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 1082 | } | 1612 | } |
| 1083 | #[doc = "Capture/Compare 1 output Polarity"] | 1613 | #[doc = "Capture/compare 1 interrupt flag"] |
| 1084 | pub fn ccp(&self, n: usize) -> bool { | 1614 | pub fn ccif(&self, n: usize) -> bool { |
| 1085 | assert!(n < 4usize); | 1615 | assert!(n < 4usize); |
| 1086 | let offs = 1usize + n * 4usize; | 1616 | let offs = 1usize + n * 1usize; |
| 1087 | let val = (self.0 >> offs) & 0x01; | 1617 | let val = (self.0 >> offs) & 0x01; |
| 1088 | val != 0 | 1618 | val != 0 |
| 1089 | } | 1619 | } |
| 1090 | #[doc = "Capture/Compare 1 output Polarity"] | 1620 | #[doc = "Capture/compare 1 interrupt flag"] |
| 1091 | pub fn set_ccp(&mut self, n: usize, val: bool) { | 1621 | pub fn set_ccif(&mut self, n: usize, val: bool) { |
| 1092 | assert!(n < 4usize); | 1622 | assert!(n < 4usize); |
| 1093 | let offs = 1usize + n * 4usize; | 1623 | let offs = 1usize + n * 1usize; |
| 1094 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | 1624 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); |
| 1095 | } | 1625 | } |
| 1096 | #[doc = "Capture/Compare 1 output Polarity"] | 1626 | #[doc = "COM interrupt flag"] |
| 1097 | pub fn ccnp(&self, n: usize) -> bool { | 1627 | pub const fn comif(&self) -> bool { |
| 1628 | let val = (self.0 >> 5usize) & 0x01; | ||
| 1629 | val != 0 | ||
| 1630 | } | ||
| 1631 | #[doc = "COM interrupt flag"] | ||
| 1632 | pub fn set_comif(&mut self, val: bool) { | ||
| 1633 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | ||
| 1634 | } | ||
| 1635 | #[doc = "Trigger interrupt flag"] | ||
| 1636 | pub const fn tif(&self) -> bool { | ||
| 1637 | let val = (self.0 >> 6usize) & 0x01; | ||
| 1638 | val != 0 | ||
| 1639 | } | ||
| 1640 | #[doc = "Trigger interrupt flag"] | ||
| 1641 | pub fn set_tif(&mut self, val: bool) { | ||
| 1642 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | ||
| 1643 | } | ||
| 1644 | #[doc = "Break interrupt flag"] | ||
| 1645 | pub const fn bif(&self) -> bool { | ||
| 1646 | let val = (self.0 >> 7usize) & 0x01; | ||
| 1647 | val != 0 | ||
| 1648 | } | ||
| 1649 | #[doc = "Break interrupt flag"] | ||
| 1650 | pub fn set_bif(&mut self, val: bool) { | ||
| 1651 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 1652 | } | ||
| 1653 | #[doc = "Capture/Compare 1 overcapture flag"] | ||
| 1654 | pub fn ccof(&self, n: usize) -> bool { | ||
| 1098 | assert!(n < 4usize); | 1655 | assert!(n < 4usize); |
| 1099 | let offs = 3usize + n * 4usize; | 1656 | let offs = 9usize + n * 1usize; |
| 1100 | let val = (self.0 >> offs) & 0x01; | 1657 | let val = (self.0 >> offs) & 0x01; |
| 1101 | val != 0 | 1658 | val != 0 |
| 1102 | } | 1659 | } |
| 1103 | #[doc = "Capture/Compare 1 output Polarity"] | 1660 | #[doc = "Capture/Compare 1 overcapture flag"] |
| 1104 | pub fn set_ccnp(&mut self, n: usize, val: bool) { | 1661 | pub fn set_ccof(&mut self, n: usize, val: bool) { |
| 1105 | assert!(n < 4usize); | 1662 | assert!(n < 4usize); |
| 1106 | let offs = 3usize + n * 4usize; | 1663 | let offs = 9usize + n * 1usize; |
| 1107 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | 1664 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); |
| 1108 | } | 1665 | } |
| 1109 | } | 1666 | } |
| 1110 | impl Default for CcerGp { | 1667 | impl Default for SrGp { |
| 1111 | fn default() -> CcerGp { | 1668 | fn default() -> SrGp { |
| 1112 | CcerGp(0) | 1669 | SrGp(0) |
| 1113 | } | 1670 | } |
| 1114 | } | 1671 | } |
| 1115 | #[doc = "control register 1"] | 1672 | #[doc = "event generation register"] |
| 1116 | #[repr(transparent)] | 1673 | #[repr(transparent)] |
| 1117 | #[derive(Copy, Clone, Eq, PartialEq)] | 1674 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 1118 | pub struct Cr1Gp(pub u32); | 1675 | pub struct EgrGp(pub u32); |
| 1119 | impl Cr1Gp { | 1676 | impl EgrGp { |
| 1120 | #[doc = "Counter enable"] | 1677 | #[doc = "Update generation"] |
| 1121 | pub const fn cen(&self) -> bool { | 1678 | pub const fn ug(&self) -> bool { |
| 1122 | let val = (self.0 >> 0usize) & 0x01; | 1679 | let val = (self.0 >> 0usize) & 0x01; |
| 1123 | val != 0 | 1680 | val != 0 |
| 1124 | } | 1681 | } |
| 1125 | #[doc = "Counter enable"] | 1682 | #[doc = "Update generation"] |
| 1126 | pub fn set_cen(&mut self, val: bool) { | 1683 | pub fn set_ug(&mut self, val: bool) { |
| 1127 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 1684 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 1128 | } | 1685 | } |
| 1129 | #[doc = "Update disable"] | 1686 | #[doc = "Capture/compare 1 generation"] |
| 1130 | pub const fn udis(&self) -> bool { | 1687 | pub fn ccg(&self, n: usize) -> bool { |
| 1131 | let val = (self.0 >> 1usize) & 0x01; | 1688 | assert!(n < 4usize); |
| 1689 | let offs = 1usize + n * 1usize; | ||
| 1690 | let val = (self.0 >> offs) & 0x01; | ||
| 1132 | val != 0 | 1691 | val != 0 |
| 1133 | } | 1692 | } |
| 1134 | #[doc = "Update disable"] | 1693 | #[doc = "Capture/compare 1 generation"] |
| 1135 | pub fn set_udis(&mut self, val: bool) { | 1694 | pub fn set_ccg(&mut self, n: usize, val: bool) { |
| 1136 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 1695 | assert!(n < 4usize); |
| 1696 | let offs = 1usize + n * 1usize; | ||
| 1697 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 1137 | } | 1698 | } |
| 1138 | #[doc = "Update request source"] | 1699 | #[doc = "Capture/Compare control update generation"] |
| 1139 | pub const fn urs(&self) -> super::vals::Urs { | 1700 | pub const fn comg(&self) -> bool { |
| 1140 | let val = (self.0 >> 2usize) & 0x01; | 1701 | let val = (self.0 >> 5usize) & 0x01; |
| 1141 | super::vals::Urs(val as u8) | 1702 | val != 0 |
| 1142 | } | 1703 | } |
| 1143 | #[doc = "Update request source"] | 1704 | #[doc = "Capture/Compare control update generation"] |
| 1144 | pub fn set_urs(&mut self, val: super::vals::Urs) { | 1705 | pub fn set_comg(&mut self, val: bool) { |
| 1145 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); | 1706 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); |
| 1146 | } | 1707 | } |
| 1147 | #[doc = "One-pulse mode"] | 1708 | #[doc = "Trigger generation"] |
| 1148 | pub const fn opm(&self) -> super::vals::Opm { | 1709 | pub const fn tg(&self) -> bool { |
| 1149 | let val = (self.0 >> 3usize) & 0x01; | 1710 | let val = (self.0 >> 6usize) & 0x01; |
| 1150 | super::vals::Opm(val as u8) | 1711 | val != 0 |
| 1151 | } | 1712 | } |
| 1152 | #[doc = "One-pulse mode"] | 1713 | #[doc = "Trigger generation"] |
| 1153 | pub fn set_opm(&mut self, val: super::vals::Opm) { | 1714 | pub fn set_tg(&mut self, val: bool) { |
| 1154 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); | 1715 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 1155 | } | 1716 | } |
| 1156 | #[doc = "Direction"] | 1717 | #[doc = "Break generation"] |
| 1157 | pub const fn dir(&self) -> super::vals::Dir { | 1718 | pub const fn bg(&self) -> bool { |
| 1158 | let val = (self.0 >> 4usize) & 0x01; | 1719 | let val = (self.0 >> 7usize) & 0x01; |
| 1159 | super::vals::Dir(val as u8) | 1720 | val != 0 |
| 1160 | } | 1721 | } |
| 1161 | #[doc = "Direction"] | 1722 | #[doc = "Break generation"] |
| 1162 | pub fn set_dir(&mut self, val: super::vals::Dir) { | 1723 | pub fn set_bg(&mut self, val: bool) { |
| 1163 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize); | 1724 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); |
| 1164 | } | 1725 | } |
| 1165 | #[doc = "Center-aligned mode selection"] | 1726 | } |
| 1166 | pub const fn cms(&self) -> super::vals::Cms { | 1727 | impl Default for EgrGp { |
| 1167 | let val = (self.0 >> 5usize) & 0x03; | 1728 | fn default() -> EgrGp { |
| 1168 | super::vals::Cms(val as u8) | 1729 | EgrGp(0) |
| 1169 | } | 1730 | } |
| 1170 | #[doc = "Center-aligned mode selection"] | 1731 | } |
| 1171 | pub fn set_cms(&mut self, val: super::vals::Cms) { | 1732 | #[doc = "capture/compare register 1"] |
| 1172 | self.0 = (self.0 & !(0x03 << 5usize)) | (((val.0 as u32) & 0x03) << 5usize); | 1733 | #[repr(transparent)] |
| 1734 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 1735 | pub struct Ccr16(pub u32); | ||
| 1736 | impl Ccr16 { | ||
| 1737 | #[doc = "Capture/Compare 1 value"] | ||
| 1738 | pub const fn ccr(&self) -> u16 { | ||
| 1739 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 1740 | val as u16 | ||
| 1173 | } | 1741 | } |
| 1174 | #[doc = "Auto-reload preload enable"] | 1742 | #[doc = "Capture/Compare 1 value"] |
| 1175 | pub const fn arpe(&self) -> super::vals::Arpe { | 1743 | pub fn set_ccr(&mut self, val: u16) { |
| 1176 | let val = (self.0 >> 7usize) & 0x01; | 1744 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); |
| 1177 | super::vals::Arpe(val as u8) | ||
| 1178 | } | 1745 | } |
| 1179 | #[doc = "Auto-reload preload enable"] | 1746 | } |
| 1180 | pub fn set_arpe(&mut self, val: super::vals::Arpe) { | 1747 | impl Default for Ccr16 { |
| 1181 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); | 1748 | fn default() -> Ccr16 { |
| 1749 | Ccr16(0) | ||
| 1182 | } | 1750 | } |
| 1183 | #[doc = "Clock division"] | 1751 | } |
| 1184 | pub const fn ckd(&self) -> super::vals::Ckd { | 1752 | #[doc = "auto-reload register"] |
| 1185 | let val = (self.0 >> 8usize) & 0x03; | 1753 | #[repr(transparent)] |
| 1186 | super::vals::Ckd(val as u8) | 1754 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 1755 | pub struct Arr32(pub u32); | ||
| 1756 | impl Arr32 { | ||
| 1757 | #[doc = "Auto-reload value"] | ||
| 1758 | pub const fn arr(&self) -> u32 { | ||
| 1759 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 1760 | val as u32 | ||
| 1187 | } | 1761 | } |
| 1188 | #[doc = "Clock division"] | 1762 | #[doc = "Auto-reload value"] |
| 1189 | pub fn set_ckd(&mut self, val: super::vals::Ckd) { | 1763 | pub fn set_arr(&mut self, val: u32) { |
| 1190 | self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize); | 1764 | self.0 = |
| 1765 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 1191 | } | 1766 | } |
| 1192 | } | 1767 | } |
| 1193 | impl Default for Cr1Gp { | 1768 | impl Default for Arr32 { |
| 1194 | fn default() -> Cr1Gp { | 1769 | fn default() -> Arr32 { |
| 1195 | Cr1Gp(0) | 1770 | Arr32(0) |
| 1196 | } | 1771 | } |
| 1197 | } | 1772 | } |
| 1198 | #[doc = "control register 2"] | 1773 | #[doc = "control register 2"] |
| 1199 | #[repr(transparent)] | 1774 | #[repr(transparent)] |
| 1200 | #[derive(Copy, Clone, Eq, PartialEq)] | 1775 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 1201 | pub struct Cr2Gp(pub u32); | 1776 | pub struct Cr2Basic(pub u32); |
| 1202 | impl Cr2Gp { | 1777 | impl Cr2Basic { |
| 1203 | #[doc = "Capture/compare DMA selection"] | ||
| 1204 | pub const fn ccds(&self) -> super::vals::Ccds { | ||
| 1205 | let val = (self.0 >> 3usize) & 0x01; | ||
| 1206 | super::vals::Ccds(val as u8) | ||
| 1207 | } | ||
| 1208 | #[doc = "Capture/compare DMA selection"] | ||
| 1209 | pub fn set_ccds(&mut self, val: super::vals::Ccds) { | ||
| 1210 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); | ||
| 1211 | } | ||
| 1212 | #[doc = "Master mode selection"] | 1778 | #[doc = "Master mode selection"] |
| 1213 | pub const fn mms(&self) -> super::vals::Mms { | 1779 | pub const fn mms(&self) -> super::vals::Mms { |
| 1214 | let val = (self.0 >> 4usize) & 0x07; | 1780 | let val = (self.0 >> 4usize) & 0x07; |
| @@ -1218,142 +1784,134 @@ pub mod timer_v1 { | |||
| 1218 | pub fn set_mms(&mut self, val: super::vals::Mms) { | 1784 | pub fn set_mms(&mut self, val: super::vals::Mms) { |
| 1219 | self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize); | 1785 | self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize); |
| 1220 | } | 1786 | } |
| 1221 | #[doc = "TI1 selection"] | 1787 | } |
| 1222 | pub const fn ti1s(&self) -> super::vals::Tis { | 1788 | impl Default for Cr2Basic { |
| 1223 | let val = (self.0 >> 7usize) & 0x01; | 1789 | fn default() -> Cr2Basic { |
| 1224 | super::vals::Tis(val as u8) | 1790 | Cr2Basic(0) |
| 1225 | } | 1791 | } |
| 1226 | #[doc = "TI1 selection"] | 1792 | } |
| 1227 | pub fn set_ti1s(&mut self, val: super::vals::Tis) { | 1793 | #[doc = "auto-reload register"] |
| 1228 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); | 1794 | #[repr(transparent)] |
| 1795 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 1796 | pub struct Arr16(pub u32); | ||
| 1797 | impl Arr16 { | ||
| 1798 | #[doc = "Auto-reload value"] | ||
| 1799 | pub const fn arr(&self) -> u16 { | ||
| 1800 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 1801 | val as u16 | ||
| 1802 | } | ||
| 1803 | #[doc = "Auto-reload value"] | ||
| 1804 | pub fn set_arr(&mut self, val: u16) { | ||
| 1805 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 1229 | } | 1806 | } |
| 1230 | } | 1807 | } |
| 1231 | impl Default for Cr2Gp { | 1808 | impl Default for Arr16 { |
| 1232 | fn default() -> Cr2Gp { | 1809 | fn default() -> Arr16 { |
| 1233 | Cr2Gp(0) | 1810 | Arr16(0) |
| 1234 | } | 1811 | } |
| 1235 | } | 1812 | } |
| 1236 | #[doc = "break and dead-time register"] | 1813 | #[doc = "repetition counter register"] |
| 1237 | #[repr(transparent)] | 1814 | #[repr(transparent)] |
| 1238 | #[derive(Copy, Clone, Eq, PartialEq)] | 1815 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 1239 | pub struct Bdtr(pub u32); | 1816 | pub struct Rcr(pub u32); |
| 1240 | impl Bdtr { | 1817 | impl Rcr { |
| 1241 | #[doc = "Dead-time generator setup"] | 1818 | #[doc = "Repetition counter value"] |
| 1242 | pub const fn dtg(&self) -> u8 { | 1819 | pub const fn rep(&self) -> u8 { |
| 1243 | let val = (self.0 >> 0usize) & 0xff; | 1820 | let val = (self.0 >> 0usize) & 0xff; |
| 1244 | val as u8 | 1821 | val as u8 |
| 1245 | } | 1822 | } |
| 1246 | #[doc = "Dead-time generator setup"] | 1823 | #[doc = "Repetition counter value"] |
| 1247 | pub fn set_dtg(&mut self, val: u8) { | 1824 | pub fn set_rep(&mut self, val: u8) { |
| 1248 | self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); | 1825 | self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); |
| 1249 | } | 1826 | } |
| 1250 | #[doc = "Lock configuration"] | 1827 | } |
| 1251 | pub const fn lock(&self) -> u8 { | 1828 | impl Default for Rcr { |
| 1252 | let val = (self.0 >> 8usize) & 0x03; | 1829 | fn default() -> Rcr { |
| 1253 | val as u8 | 1830 | Rcr(0) |
| 1254 | } | ||
| 1255 | #[doc = "Lock configuration"] | ||
| 1256 | pub fn set_lock(&mut self, val: u8) { | ||
| 1257 | self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize); | ||
| 1258 | } | ||
| 1259 | #[doc = "Off-state selection for Idle mode"] | ||
| 1260 | pub const fn ossi(&self) -> super::vals::Ossi { | ||
| 1261 | let val = (self.0 >> 10usize) & 0x01; | ||
| 1262 | super::vals::Ossi(val as u8) | ||
| 1263 | } | ||
| 1264 | #[doc = "Off-state selection for Idle mode"] | ||
| 1265 | pub fn set_ossi(&mut self, val: super::vals::Ossi) { | ||
| 1266 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); | ||
| 1267 | } | ||
| 1268 | #[doc = "Off-state selection for Run mode"] | ||
| 1269 | pub const fn ossr(&self) -> super::vals::Ossr { | ||
| 1270 | let val = (self.0 >> 11usize) & 0x01; | ||
| 1271 | super::vals::Ossr(val as u8) | ||
| 1272 | } | ||
| 1273 | #[doc = "Off-state selection for Run mode"] | ||
| 1274 | pub fn set_ossr(&mut self, val: super::vals::Ossr) { | ||
| 1275 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize); | ||
| 1276 | } | 1831 | } |
| 1277 | #[doc = "Break enable"] | 1832 | } |
| 1278 | pub const fn bke(&self) -> bool { | 1833 | #[doc = "capture/compare enable register"] |
| 1279 | let val = (self.0 >> 12usize) & 0x01; | 1834 | #[repr(transparent)] |
| 1835 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 1836 | pub struct CcerAdv(pub u32); | ||
| 1837 | impl CcerAdv { | ||
| 1838 | #[doc = "Capture/Compare 1 output enable"] | ||
| 1839 | pub fn cce(&self, n: usize) -> bool { | ||
| 1840 | assert!(n < 4usize); | ||
| 1841 | let offs = 0usize + n * 4usize; | ||
| 1842 | let val = (self.0 >> offs) & 0x01; | ||
| 1280 | val != 0 | 1843 | val != 0 |
| 1281 | } | 1844 | } |
| 1282 | #[doc = "Break enable"] | 1845 | #[doc = "Capture/Compare 1 output enable"] |
| 1283 | pub fn set_bke(&mut self, val: bool) { | 1846 | pub fn set_cce(&mut self, n: usize, val: bool) { |
| 1284 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); | 1847 | assert!(n < 4usize); |
| 1848 | let offs = 0usize + n * 4usize; | ||
| 1849 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 1285 | } | 1850 | } |
| 1286 | #[doc = "Break polarity"] | 1851 | #[doc = "Capture/Compare 1 output Polarity"] |
| 1287 | pub const fn bkp(&self) -> bool { | 1852 | pub fn ccp(&self, n: usize) -> bool { |
| 1288 | let val = (self.0 >> 13usize) & 0x01; | 1853 | assert!(n < 4usize); |
| 1854 | let offs = 1usize + n * 4usize; | ||
| 1855 | let val = (self.0 >> offs) & 0x01; | ||
| 1289 | val != 0 | 1856 | val != 0 |
| 1290 | } | 1857 | } |
| 1291 | #[doc = "Break polarity"] | 1858 | #[doc = "Capture/Compare 1 output Polarity"] |
| 1292 | pub fn set_bkp(&mut self, val: bool) { | 1859 | pub fn set_ccp(&mut self, n: usize, val: bool) { |
| 1293 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); | 1860 | assert!(n < 4usize); |
| 1861 | let offs = 1usize + n * 4usize; | ||
| 1862 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 1294 | } | 1863 | } |
| 1295 | #[doc = "Automatic output enable"] | 1864 | #[doc = "Capture/Compare 1 complementary output enable"] |
| 1296 | pub const fn aoe(&self) -> bool { | 1865 | pub fn ccne(&self, n: usize) -> bool { |
| 1297 | let val = (self.0 >> 14usize) & 0x01; | 1866 | assert!(n < 4usize); |
| 1867 | let offs = 2usize + n * 4usize; | ||
| 1868 | let val = (self.0 >> offs) & 0x01; | ||
| 1298 | val != 0 | 1869 | val != 0 |
| 1299 | } | 1870 | } |
| 1300 | #[doc = "Automatic output enable"] | 1871 | #[doc = "Capture/Compare 1 complementary output enable"] |
| 1301 | pub fn set_aoe(&mut self, val: bool) { | 1872 | pub fn set_ccne(&mut self, n: usize, val: bool) { |
| 1302 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); | 1873 | assert!(n < 4usize); |
| 1874 | let offs = 2usize + n * 4usize; | ||
| 1875 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 1303 | } | 1876 | } |
| 1304 | #[doc = "Main output enable"] | 1877 | #[doc = "Capture/Compare 1 output Polarity"] |
| 1305 | pub const fn moe(&self) -> bool { | 1878 | pub fn ccnp(&self, n: usize) -> bool { |
| 1306 | let val = (self.0 >> 15usize) & 0x01; | 1879 | assert!(n < 4usize); |
| 1880 | let offs = 3usize + n * 4usize; | ||
| 1881 | let val = (self.0 >> offs) & 0x01; | ||
| 1307 | val != 0 | 1882 | val != 0 |
| 1308 | } | 1883 | } |
| 1309 | #[doc = "Main output enable"] | 1884 | #[doc = "Capture/Compare 1 output Polarity"] |
| 1310 | pub fn set_moe(&mut self, val: bool) { | 1885 | pub fn set_ccnp(&mut self, n: usize, val: bool) { |
| 1311 | self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); | 1886 | assert!(n < 4usize); |
| 1312 | } | 1887 | let offs = 3usize + n * 4usize; |
| 1313 | } | 1888 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); |
| 1314 | impl Default for Bdtr { | ||
| 1315 | fn default() -> Bdtr { | ||
| 1316 | Bdtr(0) | ||
| 1317 | } | ||
| 1318 | } | ||
| 1319 | #[doc = "prescaler"] | ||
| 1320 | #[repr(transparent)] | ||
| 1321 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 1322 | pub struct Psc(pub u32); | ||
| 1323 | impl Psc { | ||
| 1324 | #[doc = "Prescaler value"] | ||
| 1325 | pub const fn psc(&self) -> u16 { | ||
| 1326 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 1327 | val as u16 | ||
| 1328 | } | ||
| 1329 | #[doc = "Prescaler value"] | ||
| 1330 | pub fn set_psc(&mut self, val: u16) { | ||
| 1331 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 1332 | } | 1889 | } |
| 1333 | } | 1890 | } |
| 1334 | impl Default for Psc { | 1891 | impl Default for CcerAdv { |
| 1335 | fn default() -> Psc { | 1892 | fn default() -> CcerAdv { |
| 1336 | Psc(0) | 1893 | CcerAdv(0) |
| 1337 | } | 1894 | } |
| 1338 | } | 1895 | } |
| 1339 | #[doc = "repetition counter register"] | 1896 | #[doc = "capture/compare register 1"] |
| 1340 | #[repr(transparent)] | 1897 | #[repr(transparent)] |
| 1341 | #[derive(Copy, Clone, Eq, PartialEq)] | 1898 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 1342 | pub struct Rcr(pub u32); | 1899 | pub struct Ccr32(pub u32); |
| 1343 | impl Rcr { | 1900 | impl Ccr32 { |
| 1344 | #[doc = "Repetition counter value"] | 1901 | #[doc = "Capture/Compare 1 value"] |
| 1345 | pub const fn rep(&self) -> u8 { | 1902 | pub const fn ccr(&self) -> u32 { |
| 1346 | let val = (self.0 >> 0usize) & 0xff; | 1903 | let val = (self.0 >> 0usize) & 0xffff_ffff; |
| 1347 | val as u8 | 1904 | val as u32 |
| 1348 | } | 1905 | } |
| 1349 | #[doc = "Repetition counter value"] | 1906 | #[doc = "Capture/Compare 1 value"] |
| 1350 | pub fn set_rep(&mut self, val: u8) { | 1907 | pub fn set_ccr(&mut self, val: u32) { |
| 1351 | self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); | 1908 | self.0 = |
| 1909 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 1352 | } | 1910 | } |
| 1353 | } | 1911 | } |
| 1354 | impl Default for Rcr { | 1912 | impl Default for Ccr32 { |
| 1355 | fn default() -> Rcr { | 1913 | fn default() -> Ccr32 { |
| 1356 | Rcr(0) | 1914 | Ccr32(0) |
| 1357 | } | 1915 | } |
| 1358 | } | 1916 | } |
| 1359 | #[doc = "DMA/Interrupt enable register"] | 1917 | #[doc = "DMA/Interrupt enable register"] |
| @@ -1459,8 +2017,8 @@ pub mod timer_v1 { | |||
| 1459 | #[doc = "event generation register"] | 2017 | #[doc = "event generation register"] |
| 1460 | #[repr(transparent)] | 2018 | #[repr(transparent)] |
| 1461 | #[derive(Copy, Clone, Eq, PartialEq)] | 2019 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 1462 | pub struct EgrBasic(pub u32); | 2020 | pub struct EgrAdv(pub u32); |
| 1463 | impl EgrBasic { | 2021 | impl EgrAdv { |
| 1464 | #[doc = "Update generation"] | 2022 | #[doc = "Update generation"] |
| 1465 | pub const fn ug(&self) -> bool { | 2023 | pub const fn ug(&self) -> bool { |
| 1466 | let val = (self.0 >> 0usize) & 0x01; | 2024 | let val = (self.0 >> 0usize) & 0x01; |
| @@ -1470,213 +2028,213 @@ pub mod timer_v1 { | |||
| 1470 | pub fn set_ug(&mut self, val: bool) { | 2028 | pub fn set_ug(&mut self, val: bool) { |
| 1471 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 2029 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 1472 | } | 2030 | } |
| 1473 | } | 2031 | #[doc = "Capture/compare 1 generation"] |
| 1474 | impl Default for EgrBasic { | 2032 | pub fn ccg(&self, n: usize) -> bool { |
| 1475 | fn default() -> EgrBasic { | 2033 | assert!(n < 4usize); |
| 1476 | EgrBasic(0) | 2034 | let offs = 1usize + n * 1usize; |
| 2035 | let val = (self.0 >> offs) & 0x01; | ||
| 2036 | val != 0 | ||
| 1477 | } | 2037 | } |
| 1478 | } | 2038 | #[doc = "Capture/compare 1 generation"] |
| 1479 | #[doc = "capture/compare register 1"] | 2039 | pub fn set_ccg(&mut self, n: usize, val: bool) { |
| 1480 | #[repr(transparent)] | 2040 | assert!(n < 4usize); |
| 1481 | #[derive(Copy, Clone, Eq, PartialEq)] | 2041 | let offs = 1usize + n * 1usize; |
| 1482 | pub struct Ccr16(pub u32); | 2042 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); |
| 1483 | impl Ccr16 { | ||
| 1484 | #[doc = "Capture/Compare 1 value"] | ||
| 1485 | pub const fn ccr(&self) -> u16 { | ||
| 1486 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 1487 | val as u16 | ||
| 1488 | } | 2043 | } |
| 1489 | #[doc = "Capture/Compare 1 value"] | 2044 | #[doc = "Capture/Compare control update generation"] |
| 1490 | pub fn set_ccr(&mut self, val: u16) { | 2045 | pub const fn comg(&self) -> bool { |
| 1491 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | 2046 | let val = (self.0 >> 5usize) & 0x01; |
| 2047 | val != 0 | ||
| 1492 | } | 2048 | } |
| 1493 | } | 2049 | #[doc = "Capture/Compare control update generation"] |
| 1494 | impl Default for Ccr16 { | 2050 | pub fn set_comg(&mut self, val: bool) { |
| 1495 | fn default() -> Ccr16 { | 2051 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); |
| 1496 | Ccr16(0) | ||
| 1497 | } | 2052 | } |
| 1498 | } | 2053 | #[doc = "Trigger generation"] |
| 1499 | #[doc = "status register"] | 2054 | pub const fn tg(&self) -> bool { |
| 1500 | #[repr(transparent)] | 2055 | let val = (self.0 >> 6usize) & 0x01; |
| 1501 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 1502 | pub struct SrBasic(pub u32); | ||
| 1503 | impl SrBasic { | ||
| 1504 | #[doc = "Update interrupt flag"] | ||
| 1505 | pub const fn uif(&self) -> bool { | ||
| 1506 | let val = (self.0 >> 0usize) & 0x01; | ||
| 1507 | val != 0 | 2056 | val != 0 |
| 1508 | } | 2057 | } |
| 1509 | #[doc = "Update interrupt flag"] | 2058 | #[doc = "Trigger generation"] |
| 1510 | pub fn set_uif(&mut self, val: bool) { | 2059 | pub fn set_tg(&mut self, val: bool) { |
| 1511 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 2060 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 2061 | } | ||
| 2062 | #[doc = "Break generation"] | ||
| 2063 | pub const fn bg(&self) -> bool { | ||
| 2064 | let val = (self.0 >> 7usize) & 0x01; | ||
| 2065 | val != 0 | ||
| 2066 | } | ||
| 2067 | #[doc = "Break generation"] | ||
| 2068 | pub fn set_bg(&mut self, val: bool) { | ||
| 2069 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 1512 | } | 2070 | } |
| 1513 | } | 2071 | } |
| 1514 | impl Default for SrBasic { | 2072 | impl Default for EgrAdv { |
| 1515 | fn default() -> SrBasic { | 2073 | fn default() -> EgrAdv { |
| 1516 | SrBasic(0) | 2074 | EgrAdv(0) |
| 1517 | } | 2075 | } |
| 1518 | } | 2076 | } |
| 1519 | #[doc = "DMA control register"] | 2077 | } |
| 2078 | pub mod vals { | ||
| 2079 | use crate::generic::*; | ||
| 1520 | #[repr(transparent)] | 2080 | #[repr(transparent)] |
| 1521 | #[derive(Copy, Clone, Eq, PartialEq)] | 2081 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 1522 | pub struct Dcr(pub u32); | 2082 | pub struct Sms(pub u8); |
| 1523 | impl Dcr { | 2083 | impl Sms { |
| 1524 | #[doc = "DMA base address"] | 2084 | #[doc = "Slave mode disabled - if CEN = ‘1 then the prescaler is clocked directly by the internal clock."] |
| 1525 | pub const fn dba(&self) -> u8 { | 2085 | pub const DISABLED: Self = Self(0); |
| 1526 | let val = (self.0 >> 0usize) & 0x1f; | 2086 | #[doc = "Encoder mode 1 - Counter counts up/down on TI2FP1 edge depending on TI1FP2 level."] |
| 1527 | val as u8 | 2087 | pub const ENCODER_MODE_1: Self = Self(0x01); |
| 1528 | } | 2088 | #[doc = "Encoder mode 2 - Counter counts up/down on TI1FP2 edge depending on TI2FP1 level."] |
| 1529 | #[doc = "DMA base address"] | 2089 | pub const ENCODER_MODE_2: Self = Self(0x02); |
| 1530 | pub fn set_dba(&mut self, val: u8) { | 2090 | #[doc = "Encoder mode 3 - Counter counts up/down on both TI1FP1 and TI2FP2 edges depending on the level of the other input."] |
| 1531 | self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); | 2091 | pub const ENCODER_MODE_3: Self = Self(0x03); |
| 1532 | } | 2092 | #[doc = "Reset Mode - Rising edge of the selected trigger input (TRGI) reinitializes the counter and generates an update of the registers."] |
| 1533 | #[doc = "DMA burst length"] | 2093 | pub const RESET_MODE: Self = Self(0x04); |
| 1534 | pub const fn dbl(&self) -> u8 { | 2094 | #[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."] |
| 1535 | let val = (self.0 >> 8usize) & 0x1f; | 2095 | pub const GATED_MODE: Self = Self(0x05); |
| 1536 | val as u8 | 2096 | #[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."] |
| 1537 | } | 2097 | pub const TRIGGER_MODE: Self = Self(0x06); |
| 1538 | #[doc = "DMA burst length"] | 2098 | #[doc = "External Clock Mode 1 - Rising edges of the selected trigger (TRGI) clock the counter."] |
| 1539 | pub fn set_dbl(&mut self, val: u8) { | 2099 | pub const EXT_CLOCK_MODE: Self = Self(0x07); |
| 1540 | self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize); | ||
| 1541 | } | ||
| 1542 | } | 2100 | } |
| 1543 | impl Default for Dcr { | 2101 | #[repr(transparent)] |
| 1544 | fn default() -> Dcr { | 2102 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 1545 | Dcr(0) | 2103 | pub struct Ece(pub u8); |
| 1546 | } | 2104 | impl Ece { |
| 2105 | #[doc = "External clock mode 2 disabled"] | ||
| 2106 | pub const DISABLED: Self = Self(0); | ||
| 2107 | #[doc = "External clock mode 2 enabled. The counter is clocked by any active edge on the ETRF signal."] | ||
| 2108 | pub const ENABLED: Self = Self(0x01); | ||
| 1547 | } | 2109 | } |
| 1548 | #[doc = "DMA/Interrupt enable register"] | ||
| 1549 | #[repr(transparent)] | 2110 | #[repr(transparent)] |
| 1550 | #[derive(Copy, Clone, Eq, PartialEq)] | 2111 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 1551 | pub struct DierBasic(pub u32); | 2112 | pub struct Ocm(pub u8); |
| 1552 | impl DierBasic { | 2113 | impl Ocm { |
| 1553 | #[doc = "Update interrupt enable"] | 2114 | #[doc = "The comparison between the output compare register TIMx_CCRy and the counter TIMx_CNT has no effect on the outputs"] |
| 1554 | pub const fn uie(&self) -> bool { | 2115 | pub const FROZEN: Self = Self(0); |
| 1555 | let val = (self.0 >> 0usize) & 0x01; | 2116 | #[doc = "Set channel to active level on match. OCyREF signal is forced high when the counter matches the capture/compare register"] |
| 1556 | val != 0 | 2117 | pub const ACTIVEONMATCH: Self = Self(0x01); |
| 1557 | } | 2118 | #[doc = "Set channel to inactive level on match. OCyREF signal is forced low when the counter matches the capture/compare register"] |
| 1558 | #[doc = "Update interrupt enable"] | 2119 | pub const INACTIVEONMATCH: Self = Self(0x02); |
| 1559 | pub fn set_uie(&mut self, val: bool) { | 2120 | #[doc = "OCyREF toggles when TIMx_CNT=TIMx_CCRy"] |
| 1560 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 2121 | pub const TOGGLE: Self = Self(0x03); |
| 1561 | } | 2122 | #[doc = "OCyREF is forced low"] |
| 1562 | #[doc = "Update DMA request enable"] | 2123 | pub const FORCEINACTIVE: Self = Self(0x04); |
| 1563 | pub const fn ude(&self) -> bool { | 2124 | #[doc = "OCyREF is forced high"] |
| 1564 | let val = (self.0 >> 8usize) & 0x01; | 2125 | pub const FORCEACTIVE: Self = Self(0x05); |
| 1565 | val != 0 | 2126 | #[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"] |
| 1566 | } | 2127 | pub const PWMMODE1: Self = Self(0x06); |
| 1567 | #[doc = "Update DMA request enable"] | 2128 | #[doc = "Inversely to PwmMode1"] |
| 1568 | pub fn set_ude(&mut self, val: bool) { | 2129 | pub const PWMMODE2: Self = Self(0x07); |
| 1569 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | ||
| 1570 | } | ||
| 1571 | } | 2130 | } |
| 1572 | impl Default for DierBasic { | 2131 | #[repr(transparent)] |
| 1573 | fn default() -> DierBasic { | 2132 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 1574 | DierBasic(0) | 2133 | pub struct Ckd(pub u8); |
| 1575 | } | 2134 | impl Ckd { |
| 2135 | #[doc = "t_DTS = t_CK_INT"] | ||
| 2136 | pub const DIV1: Self = Self(0); | ||
| 2137 | #[doc = "t_DTS = 2 × t_CK_INT"] | ||
| 2138 | pub const DIV2: Self = Self(0x01); | ||
| 2139 | #[doc = "t_DTS = 4 × t_CK_INT"] | ||
| 2140 | pub const DIV4: Self = Self(0x02); | ||
| 1576 | } | 2141 | } |
| 1577 | #[doc = "auto-reload register"] | ||
| 1578 | #[repr(transparent)] | 2142 | #[repr(transparent)] |
| 1579 | #[derive(Copy, Clone, Eq, PartialEq)] | 2143 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 1580 | pub struct Arr16(pub u32); | 2144 | pub struct Ccds(pub u8); |
| 1581 | impl Arr16 { | 2145 | impl Ccds { |
| 1582 | #[doc = "Auto-reload value"] | 2146 | #[doc = "CCx DMA request sent when CCx event occurs"] |
| 1583 | pub const fn arr(&self) -> u16 { | 2147 | pub const ONCOMPARE: Self = Self(0); |
| 1584 | let val = (self.0 >> 0usize) & 0xffff; | 2148 | #[doc = "CCx DMA request sent when update event occurs"] |
| 1585 | val as u16 | 2149 | pub const ONUPDATE: Self = Self(0x01); |
| 1586 | } | ||
| 1587 | #[doc = "Auto-reload value"] | ||
| 1588 | pub fn set_arr(&mut self, val: u16) { | ||
| 1589 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 1590 | } | ||
| 1591 | } | 2150 | } |
| 1592 | impl Default for Arr16 { | 2151 | #[repr(transparent)] |
| 1593 | fn default() -> Arr16 { | 2152 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 1594 | Arr16(0) | 2153 | pub struct Msm(pub u8); |
| 1595 | } | 2154 | impl Msm { |
| 2155 | #[doc = "No action"] | ||
| 2156 | pub const NOSYNC: Self = Self(0); | ||
| 2157 | #[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."] | ||
| 2158 | pub const SYNC: Self = Self(0x01); | ||
| 1596 | } | 2159 | } |
| 1597 | #[doc = "capture/compare mode register 2 (output mode)"] | ||
| 1598 | #[repr(transparent)] | 2160 | #[repr(transparent)] |
| 1599 | #[derive(Copy, Clone, Eq, PartialEq)] | 2161 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 1600 | pub struct CcmrOutput(pub u32); | 2162 | pub struct Etps(pub u8); |
| 1601 | impl CcmrOutput { | 2163 | impl Etps { |
| 1602 | #[doc = "Capture/Compare 3 selection"] | 2164 | #[doc = "Prescaler OFF"] |
| 1603 | pub fn ccs(&self, n: usize) -> super::vals::CcmrOutputCcs { | 2165 | pub const DIV1: Self = Self(0); |
| 1604 | assert!(n < 2usize); | 2166 | #[doc = "ETRP frequency divided by 2"] |
| 1605 | let offs = 0usize + n * 8usize; | 2167 | pub const DIV2: Self = Self(0x01); |
| 1606 | let val = (self.0 >> offs) & 0x03; | 2168 | #[doc = "ETRP frequency divided by 4"] |
| 1607 | super::vals::CcmrOutputCcs(val as u8) | 2169 | pub const DIV4: Self = Self(0x02); |
| 1608 | } | 2170 | #[doc = "ETRP frequency divided by 8"] |
| 1609 | #[doc = "Capture/Compare 3 selection"] | 2171 | pub const DIV8: Self = Self(0x03); |
| 1610 | pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrOutputCcs) { | ||
| 1611 | assert!(n < 2usize); | ||
| 1612 | let offs = 0usize + n * 8usize; | ||
| 1613 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 1614 | } | ||
| 1615 | #[doc = "Output compare 3 fast enable"] | ||
| 1616 | pub fn ocfe(&self, n: usize) -> bool { | ||
| 1617 | assert!(n < 2usize); | ||
| 1618 | let offs = 2usize + n * 8usize; | ||
| 1619 | let val = (self.0 >> offs) & 0x01; | ||
| 1620 | val != 0 | ||
| 1621 | } | ||
| 1622 | #[doc = "Output compare 3 fast enable"] | ||
| 1623 | pub fn set_ocfe(&mut self, n: usize, val: bool) { | ||
| 1624 | assert!(n < 2usize); | ||
| 1625 | let offs = 2usize + n * 8usize; | ||
| 1626 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 1627 | } | ||
| 1628 | #[doc = "Output compare 3 preload enable"] | ||
| 1629 | pub fn ocpe(&self, n: usize) -> super::vals::Ocpe { | ||
| 1630 | assert!(n < 2usize); | ||
| 1631 | let offs = 3usize + n * 8usize; | ||
| 1632 | let val = (self.0 >> offs) & 0x01; | ||
| 1633 | super::vals::Ocpe(val as u8) | ||
| 1634 | } | ||
| 1635 | #[doc = "Output compare 3 preload enable"] | ||
| 1636 | pub fn set_ocpe(&mut self, n: usize, val: super::vals::Ocpe) { | ||
| 1637 | assert!(n < 2usize); | ||
| 1638 | let offs = 3usize + n * 8usize; | ||
| 1639 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 1640 | } | ||
| 1641 | #[doc = "Output compare 3 mode"] | ||
| 1642 | pub fn ocm(&self, n: usize) -> super::vals::Ocm { | ||
| 1643 | assert!(n < 2usize); | ||
| 1644 | let offs = 4usize + n * 8usize; | ||
| 1645 | let val = (self.0 >> offs) & 0x07; | ||
| 1646 | super::vals::Ocm(val as u8) | ||
| 1647 | } | ||
| 1648 | #[doc = "Output compare 3 mode"] | ||
| 1649 | pub fn set_ocm(&mut self, n: usize, val: super::vals::Ocm) { | ||
| 1650 | assert!(n < 2usize); | ||
| 1651 | let offs = 4usize + n * 8usize; | ||
| 1652 | self.0 = (self.0 & !(0x07 << offs)) | (((val.0 as u32) & 0x07) << offs); | ||
| 1653 | } | ||
| 1654 | #[doc = "Output compare 3 clear enable"] | ||
| 1655 | pub fn occe(&self, n: usize) -> bool { | ||
| 1656 | assert!(n < 2usize); | ||
| 1657 | let offs = 7usize + n * 8usize; | ||
| 1658 | let val = (self.0 >> offs) & 0x01; | ||
| 1659 | val != 0 | ||
| 1660 | } | ||
| 1661 | #[doc = "Output compare 3 clear enable"] | ||
| 1662 | pub fn set_occe(&mut self, n: usize, val: bool) { | ||
| 1663 | assert!(n < 2usize); | ||
| 1664 | let offs = 7usize + n * 8usize; | ||
| 1665 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 1666 | } | ||
| 1667 | } | 2172 | } |
| 1668 | impl Default for CcmrOutput { | 2173 | #[repr(transparent)] |
| 1669 | fn default() -> CcmrOutput { | 2174 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 1670 | CcmrOutput(0) | 2175 | pub struct Arpe(pub u8); |
| 1671 | } | 2176 | impl Arpe { |
| 2177 | #[doc = "TIMx_APRR register is not buffered"] | ||
| 2178 | pub const DISABLED: Self = Self(0); | ||
| 2179 | #[doc = "TIMx_APRR register is buffered"] | ||
| 2180 | pub const ENABLED: Self = Self(0x01); | ||
| 1672 | } | 2181 | } |
| 1673 | } | ||
| 1674 | pub mod vals { | ||
| 1675 | use crate::generic::*; | ||
| 1676 | #[repr(transparent)] | 2182 | #[repr(transparent)] |
| 1677 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 2183 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 1678 | pub struct Icf(pub u8); | 2184 | pub struct CcmrOutputCcs(pub u8); |
| 1679 | impl Icf { | 2185 | impl CcmrOutputCcs { |
| 2186 | #[doc = "CCx channel is configured as output"] | ||
| 2187 | pub const OUTPUT: Self = Self(0); | ||
| 2188 | } | ||
| 2189 | #[repr(transparent)] | ||
| 2190 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 2191 | pub struct Ossr(pub u8); | ||
| 2192 | impl Ossr { | ||
| 2193 | #[doc = "When inactive, OC/OCN outputs are disabled"] | ||
| 2194 | pub const DISABLED: Self = Self(0); | ||
| 2195 | #[doc = "When inactive, OC/OCN outputs are enabled with their inactive level"] | ||
| 2196 | pub const IDLELEVEL: Self = Self(0x01); | ||
| 2197 | } | ||
| 2198 | #[repr(transparent)] | ||
| 2199 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 2200 | pub struct Dir(pub u8); | ||
| 2201 | impl Dir { | ||
| 2202 | #[doc = "Counter used as upcounter"] | ||
| 2203 | pub const UP: Self = Self(0); | ||
| 2204 | #[doc = "Counter used as downcounter"] | ||
| 2205 | pub const DOWN: Self = Self(0x01); | ||
| 2206 | } | ||
| 2207 | #[repr(transparent)] | ||
| 2208 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 2209 | pub struct Etp(pub u8); | ||
| 2210 | impl Etp { | ||
| 2211 | #[doc = "ETR is noninverted, active at high level or rising edge"] | ||
| 2212 | pub const NOTINVERTED: Self = Self(0); | ||
| 2213 | #[doc = "ETR is inverted, active at low level or falling edge"] | ||
| 2214 | pub const INVERTED: Self = Self(0x01); | ||
| 2215 | } | ||
| 2216 | #[repr(transparent)] | ||
| 2217 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 2218 | pub struct Ocpe(pub u8); | ||
| 2219 | impl Ocpe { | ||
| 2220 | #[doc = "Preload register on CCR2 disabled. New values written to CCR2 are taken into account immediately"] | ||
| 2221 | pub const DISABLED: Self = Self(0); | ||
| 2222 | #[doc = "Preload register on CCR2 enabled. Preload value is loaded into active register on each update event"] | ||
| 2223 | pub const ENABLED: Self = Self(0x01); | ||
| 2224 | } | ||
| 2225 | #[repr(transparent)] | ||
| 2226 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 2227 | pub struct Urs(pub u8); | ||
| 2228 | impl Urs { | ||
| 2229 | #[doc = "Any of counter overflow/underflow, setting UG, or update through slave mode, generates an update interrupt or DMA request"] | ||
| 2230 | pub const ANYEVENT: Self = Self(0); | ||
| 2231 | #[doc = "Only counter overflow/underflow generates an update interrupt or DMA request"] | ||
| 2232 | pub const COUNTERONLY: Self = Self(0x01); | ||
| 2233 | } | ||
| 2234 | #[repr(transparent)] | ||
| 2235 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 2236 | pub struct Etf(pub u8); | ||
| 2237 | impl Etf { | ||
| 1680 | #[doc = "No filter, sampling is done at fDTS"] | 2238 | #[doc = "No filter, sampling is done at fDTS"] |
| 1681 | pub const NOFILTER: Self = Self(0); | 2239 | pub const NOFILTER: Self = Self(0); |
| 1682 | #[doc = "fSAMPLING=fCK_INT, N=2"] | 2240 | #[doc = "fSAMPLING=fCK_INT, N=2"] |
| @@ -1712,15 +2270,6 @@ pub mod timer_v1 { | |||
| 1712 | } | 2270 | } |
| 1713 | #[repr(transparent)] | 2271 | #[repr(transparent)] |
| 1714 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 2272 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 1715 | pub struct Ccds(pub u8); | ||
| 1716 | impl Ccds { | ||
| 1717 | #[doc = "CCx DMA request sent when CCx event occurs"] | ||
| 1718 | pub const ONCOMPARE: Self = Self(0); | ||
| 1719 | #[doc = "CCx DMA request sent when update event occurs"] | ||
| 1720 | pub const ONUPDATE: Self = Self(0x01); | ||
| 1721 | } | ||
| 1722 | #[repr(transparent)] | ||
| 1723 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1724 | pub struct Mms(pub u8); | 2273 | pub struct Mms(pub u8); |
| 1725 | impl Mms { | 2274 | impl Mms { |
| 1726 | #[doc = "The UG bit from the TIMx_EGR register is used as trigger output"] | 2275 | #[doc = "The UG bit from the TIMx_EGR register is used as trigger output"] |
| @@ -1742,75 +2291,6 @@ pub mod timer_v1 { | |||
| 1742 | } | 2291 | } |
| 1743 | #[repr(transparent)] | 2292 | #[repr(transparent)] |
| 1744 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 2293 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 1745 | pub struct Urs(pub u8); | ||
| 1746 | impl Urs { | ||
| 1747 | #[doc = "Any of counter overflow/underflow, setting UG, or update through slave mode, generates an update interrupt or DMA request"] | ||
| 1748 | pub const ANYEVENT: Self = Self(0); | ||
| 1749 | #[doc = "Only counter overflow/underflow generates an update interrupt or DMA request"] | ||
| 1750 | pub const COUNTERONLY: Self = Self(0x01); | ||
| 1751 | } | ||
| 1752 | #[repr(transparent)] | ||
| 1753 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1754 | pub struct Opm(pub u8); | ||
| 1755 | impl Opm { | ||
| 1756 | #[doc = "Counter is not stopped at update event"] | ||
| 1757 | pub const DISABLED: Self = Self(0); | ||
| 1758 | #[doc = "Counter stops counting at the next update event (clearing the CEN bit)"] | ||
| 1759 | pub const ENABLED: Self = Self(0x01); | ||
| 1760 | } | ||
| 1761 | #[repr(transparent)] | ||
| 1762 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1763 | pub struct Etps(pub u8); | ||
| 1764 | impl Etps { | ||
| 1765 | #[doc = "Prescaler OFF"] | ||
| 1766 | pub const DIV1: Self = Self(0); | ||
| 1767 | #[doc = "ETRP frequency divided by 2"] | ||
| 1768 | pub const DIV2: Self = Self(0x01); | ||
| 1769 | #[doc = "ETRP frequency divided by 4"] | ||
| 1770 | pub const DIV4: Self = Self(0x02); | ||
| 1771 | #[doc = "ETRP frequency divided by 8"] | ||
| 1772 | pub const DIV8: Self = Self(0x03); | ||
| 1773 | } | ||
| 1774 | #[repr(transparent)] | ||
| 1775 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1776 | pub struct Ckd(pub u8); | ||
| 1777 | impl Ckd { | ||
| 1778 | #[doc = "t_DTS = t_CK_INT"] | ||
| 1779 | pub const DIV1: Self = Self(0); | ||
| 1780 | #[doc = "t_DTS = 2 × t_CK_INT"] | ||
| 1781 | pub const DIV2: Self = Self(0x01); | ||
| 1782 | #[doc = "t_DTS = 4 × t_CK_INT"] | ||
| 1783 | pub const DIV4: Self = Self(0x02); | ||
| 1784 | } | ||
| 1785 | #[repr(transparent)] | ||
| 1786 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1787 | pub struct CcmrInputCcs(pub u8); | ||
| 1788 | impl CcmrInputCcs { | ||
| 1789 | #[doc = "CCx channel is configured as input, normal mapping: ICx mapped to TIx"] | ||
| 1790 | pub const TI4: Self = Self(0x01); | ||
| 1791 | #[doc = "CCx channel is configured as input, alternate mapping (switches 1 with 2, 3 with 4)"] | ||
| 1792 | pub const TI3: Self = Self(0x02); | ||
| 1793 | #[doc = "CCx channel is configured as input, ICx is mapped on TRC"] | ||
| 1794 | pub const TRC: Self = Self(0x03); | ||
| 1795 | } | ||
| 1796 | #[repr(transparent)] | ||
| 1797 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1798 | pub struct CcmrOutputCcs(pub u8); | ||
| 1799 | impl CcmrOutputCcs { | ||
| 1800 | #[doc = "CCx channel is configured as output"] | ||
| 1801 | pub const OUTPUT: Self = Self(0); | ||
| 1802 | } | ||
| 1803 | #[repr(transparent)] | ||
| 1804 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1805 | pub struct Ossi(pub u8); | ||
| 1806 | impl Ossi { | ||
| 1807 | #[doc = "When inactive, OC/OCN outputs are disabled"] | ||
| 1808 | pub const DISABLED: Self = Self(0); | ||
| 1809 | #[doc = "When inactive, OC/OCN outputs are forced to idle level"] | ||
| 1810 | pub const IDLELEVEL: Self = Self(0x01); | ||
| 1811 | } | ||
| 1812 | #[repr(transparent)] | ||
| 1813 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1814 | pub struct Ts(pub u8); | 2294 | pub struct Ts(pub u8); |
| 1815 | impl Ts { | 2295 | impl Ts { |
| 1816 | #[doc = "Internal Trigger 0 (ITR0)"] | 2296 | #[doc = "Internal Trigger 0 (ITR0)"] |
| @@ -1830,56 +2310,39 @@ pub mod timer_v1 { | |||
| 1830 | } | 2310 | } |
| 1831 | #[repr(transparent)] | 2311 | #[repr(transparent)] |
| 1832 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 2312 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 1833 | pub struct Ece(pub u8); | 2313 | pub struct Cms(pub u8); |
| 1834 | impl Ece { | 2314 | impl Cms { |
| 1835 | #[doc = "External clock mode 2 disabled"] | 2315 | #[doc = "The counter counts up or down depending on the direction bit"] |
| 1836 | pub const DISABLED: Self = Self(0); | 2316 | pub const EDGEALIGNED: Self = Self(0); |
| 1837 | #[doc = "External clock mode 2 enabled. The counter is clocked by any active edge on the ETRF signal."] | 2317 | #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set only when the counter is counting down."] |
| 1838 | pub const ENABLED: Self = Self(0x01); | 2318 | pub const CENTERALIGNED1: Self = Self(0x01); |
| 2319 | #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set only when the counter is counting up."] | ||
| 2320 | pub const CENTERALIGNED2: Self = Self(0x02); | ||
| 2321 | #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set both when the counter is counting up or down."] | ||
| 2322 | pub const CENTERALIGNED3: Self = Self(0x03); | ||
| 1839 | } | 2323 | } |
| 1840 | #[repr(transparent)] | 2324 | #[repr(transparent)] |
| 1841 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 2325 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 1842 | pub struct Ocm(pub u8); | 2326 | pub struct Ossi(pub u8); |
| 1843 | impl Ocm { | 2327 | impl Ossi { |
| 1844 | #[doc = "The comparison between the output compare register TIMx_CCRy and the counter TIMx_CNT has no effect on the outputs"] | 2328 | #[doc = "When inactive, OC/OCN outputs are disabled"] |
| 1845 | pub const FROZEN: Self = Self(0); | 2329 | pub const DISABLED: Self = Self(0); |
| 1846 | #[doc = "Set channel to active level on match. OCyREF signal is forced high when the counter matches the capture/compare register"] | 2330 | #[doc = "When inactive, OC/OCN outputs are forced to idle level"] |
| 1847 | pub const ACTIVEONMATCH: Self = Self(0x01); | 2331 | pub const IDLELEVEL: Self = Self(0x01); |
| 1848 | #[doc = "Set channel to inactive level on match. OCyREF signal is forced low when the counter matches the capture/compare register"] | ||
| 1849 | pub const INACTIVEONMATCH: Self = Self(0x02); | ||
| 1850 | #[doc = "OCyREF toggles when TIMx_CNT=TIMx_CCRy"] | ||
| 1851 | pub const TOGGLE: Self = Self(0x03); | ||
| 1852 | #[doc = "OCyREF is forced low"] | ||
| 1853 | pub const FORCEINACTIVE: Self = Self(0x04); | ||
| 1854 | #[doc = "OCyREF is forced high"] | ||
| 1855 | pub const FORCEACTIVE: Self = Self(0x05); | ||
| 1856 | #[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"] | ||
| 1857 | pub const PWMMODE1: Self = Self(0x06); | ||
| 1858 | #[doc = "Inversely to PwmMode1"] | ||
| 1859 | pub const PWMMODE2: Self = Self(0x07); | ||
| 1860 | } | 2332 | } |
| 1861 | #[repr(transparent)] | 2333 | #[repr(transparent)] |
| 1862 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 2334 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 1863 | pub struct Ocpe(pub u8); | 2335 | pub struct Opm(pub u8); |
| 1864 | impl Ocpe { | 2336 | impl Opm { |
| 1865 | #[doc = "Preload register on CCR2 disabled. New values written to CCR2 are taken into account immediately"] | 2337 | #[doc = "Counter is not stopped at update event"] |
| 1866 | pub const DISABLED: Self = Self(0); | 2338 | pub const DISABLED: Self = Self(0); |
| 1867 | #[doc = "Preload register on CCR2 enabled. Preload value is loaded into active register on each update event"] | 2339 | #[doc = "Counter stops counting at the next update event (clearing the CEN bit)"] |
| 1868 | pub const ENABLED: Self = Self(0x01); | 2340 | pub const ENABLED: Self = Self(0x01); |
| 1869 | } | 2341 | } |
| 1870 | #[repr(transparent)] | 2342 | #[repr(transparent)] |
| 1871 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 2343 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 1872 | pub struct Etp(pub u8); | 2344 | pub struct Icf(pub u8); |
| 1873 | impl Etp { | 2345 | impl Icf { |
| 1874 | #[doc = "ETR is noninverted, active at high level or rising edge"] | ||
| 1875 | pub const NOTINVERTED: Self = Self(0); | ||
| 1876 | #[doc = "ETR is inverted, active at low level or falling edge"] | ||
| 1877 | pub const INVERTED: Self = Self(0x01); | ||
| 1878 | } | ||
| 1879 | #[repr(transparent)] | ||
| 1880 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1881 | pub struct Etf(pub u8); | ||
| 1882 | impl Etf { | ||
| 1883 | #[doc = "No filter, sampling is done at fDTS"] | 2346 | #[doc = "No filter, sampling is done at fDTS"] |
| 1884 | pub const NOFILTER: Self = Self(0); | 2347 | pub const NOFILTER: Self = Self(0); |
| 1885 | #[doc = "fSAMPLING=fCK_INT, N=2"] | 2348 | #[doc = "fSAMPLING=fCK_INT, N=2"] |
| @@ -1915,55 +2378,14 @@ pub mod timer_v1 { | |||
| 1915 | } | 2378 | } |
| 1916 | #[repr(transparent)] | 2379 | #[repr(transparent)] |
| 1917 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 2380 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 1918 | pub struct Cms(pub u8); | 2381 | pub struct CcmrInputCcs(pub u8); |
| 1919 | impl Cms { | 2382 | impl CcmrInputCcs { |
| 1920 | #[doc = "The counter counts up or down depending on the direction bit"] | 2383 | #[doc = "CCx channel is configured as input, normal mapping: ICx mapped to TIx"] |
| 1921 | pub const EDGEALIGNED: Self = Self(0); | 2384 | pub const TI4: Self = Self(0x01); |
| 1922 | #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set only when the counter is counting down."] | 2385 | #[doc = "CCx channel is configured as input, alternate mapping (switches 1 with 2, 3 with 4)"] |
| 1923 | pub const CENTERALIGNED1: Self = Self(0x01); | 2386 | pub const TI3: Self = Self(0x02); |
| 1924 | #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set only when the counter is counting up."] | 2387 | #[doc = "CCx channel is configured as input, ICx is mapped on TRC"] |
| 1925 | pub const CENTERALIGNED2: Self = Self(0x02); | 2388 | pub const TRC: Self = Self(0x03); |
| 1926 | #[doc = "The counter counts up and down alternatively. Output compare interrupt flags are set both when the counter is counting up or down."] | ||
| 1927 | pub const CENTERALIGNED3: Self = Self(0x03); | ||
| 1928 | } | ||
| 1929 | #[repr(transparent)] | ||
| 1930 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1931 | pub struct Sms(pub u8); | ||
| 1932 | impl Sms { | ||
| 1933 | #[doc = "Slave mode disabled - if CEN = ‘1 then the prescaler is clocked directly by the internal clock."] | ||
| 1934 | pub const DISABLED: Self = Self(0); | ||
| 1935 | #[doc = "Encoder mode 1 - Counter counts up/down on TI2FP1 edge depending on TI1FP2 level."] | ||
| 1936 | pub const ENCODER_MODE_1: Self = Self(0x01); | ||
| 1937 | #[doc = "Encoder mode 2 - Counter counts up/down on TI1FP2 edge depending on TI2FP1 level."] | ||
| 1938 | pub const ENCODER_MODE_2: Self = Self(0x02); | ||
| 1939 | #[doc = "Encoder mode 3 - Counter counts up/down on both TI1FP1 and TI2FP2 edges depending on the level of the other input."] | ||
| 1940 | pub const ENCODER_MODE_3: Self = Self(0x03); | ||
| 1941 | #[doc = "Reset Mode - Rising edge of the selected trigger input (TRGI) reinitializes the counter and generates an update of the registers."] | ||
| 1942 | pub const RESET_MODE: Self = Self(0x04); | ||
| 1943 | #[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."] | ||
| 1944 | pub const GATED_MODE: Self = Self(0x05); | ||
| 1945 | #[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."] | ||
| 1946 | pub const TRIGGER_MODE: Self = Self(0x06); | ||
| 1947 | #[doc = "External Clock Mode 1 - Rising edges of the selected trigger (TRGI) clock the counter."] | ||
| 1948 | pub const EXT_CLOCK_MODE: Self = Self(0x07); | ||
| 1949 | } | ||
| 1950 | #[repr(transparent)] | ||
| 1951 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1952 | pub struct Arpe(pub u8); | ||
| 1953 | impl Arpe { | ||
| 1954 | #[doc = "TIMx_APRR register is not buffered"] | ||
| 1955 | pub const DISABLED: Self = Self(0); | ||
| 1956 | #[doc = "TIMx_APRR register is buffered"] | ||
| 1957 | pub const ENABLED: Self = Self(0x01); | ||
| 1958 | } | ||
| 1959 | #[repr(transparent)] | ||
| 1960 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1961 | pub struct Dir(pub u8); | ||
| 1962 | impl Dir { | ||
| 1963 | #[doc = "Counter used as upcounter"] | ||
| 1964 | pub const UP: Self = Self(0); | ||
| 1965 | #[doc = "Counter used as downcounter"] | ||
| 1966 | pub const DOWN: Self = Self(0x01); | ||
| 1967 | } | 2389 | } |
| 1968 | #[repr(transparent)] | 2390 | #[repr(transparent)] |
| 1969 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 2391 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| @@ -1974,1173 +2396,873 @@ pub mod timer_v1 { | |||
| 1974 | #[doc = "The TIMx_CH1, CH2, CH3 pins are connected to TI1 input"] | 2396 | #[doc = "The TIMx_CH1, CH2, CH3 pins are connected to TI1 input"] |
| 1975 | pub const XOR: Self = Self(0x01); | 2397 | pub const XOR: Self = Self(0x01); |
| 1976 | } | 2398 | } |
| 1977 | #[repr(transparent)] | ||
| 1978 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1979 | pub struct Msm(pub u8); | ||
| 1980 | impl Msm { | ||
| 1981 | #[doc = "No action"] | ||
| 1982 | pub const NOSYNC: Self = Self(0); | ||
| 1983 | #[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."] | ||
| 1984 | pub const SYNC: Self = Self(0x01); | ||
| 1985 | } | ||
| 1986 | #[repr(transparent)] | ||
| 1987 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1988 | pub struct Ossr(pub u8); | ||
| 1989 | impl Ossr { | ||
| 1990 | #[doc = "When inactive, OC/OCN outputs are disabled"] | ||
| 1991 | pub const DISABLED: Self = Self(0); | ||
| 1992 | #[doc = "When inactive, OC/OCN outputs are enabled with their inactive level"] | ||
| 1993 | pub const IDLELEVEL: Self = Self(0x01); | ||
| 1994 | } | ||
| 1995 | } | 2399 | } |
| 1996 | } | 2400 | } |
| 1997 | pub mod rng_v1 { | 2401 | pub mod syscfg_h7 { |
| 1998 | use crate::generic::*; | 2402 | use crate::generic::*; |
| 1999 | #[doc = "Random number generator"] | 2403 | #[doc = "System configuration controller"] |
| 2000 | #[derive(Copy, Clone)] | 2404 | #[derive(Copy, Clone)] |
| 2001 | pub struct Rng(pub *mut u8); | 2405 | pub struct Syscfg(pub *mut u8); |
| 2002 | unsafe impl Send for Rng {} | 2406 | unsafe impl Send for Syscfg {} |
| 2003 | unsafe impl Sync for Rng {} | 2407 | unsafe impl Sync for Syscfg {} |
| 2004 | impl Rng { | 2408 | impl Syscfg { |
| 2005 | #[doc = "control register"] | 2409 | #[doc = "peripheral mode configuration register"] |
| 2006 | pub fn cr(self) -> Reg<regs::Cr, RW> { | 2410 | pub fn pmcr(self) -> Reg<regs::Pmcr, RW> { |
| 2007 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 2008 | } | ||
| 2009 | #[doc = "status register"] | ||
| 2010 | pub fn sr(self) -> Reg<regs::Sr, RW> { | ||
| 2011 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | 2411 | unsafe { Reg::from_ptr(self.0.add(4usize)) } |
| 2012 | } | 2412 | } |
| 2013 | #[doc = "data register"] | 2413 | #[doc = "external interrupt configuration register 1"] |
| 2014 | pub fn dr(self) -> Reg<u32, R> { | 2414 | pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> { |
| 2015 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | 2415 | assert!(n < 4usize); |
| 2416 | unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) } | ||
| 2417 | } | ||
| 2418 | #[doc = "compensation cell control/status register"] | ||
| 2419 | pub fn cccsr(self) -> Reg<regs::Cccsr, RW> { | ||
| 2420 | unsafe { Reg::from_ptr(self.0.add(32usize)) } | ||
| 2421 | } | ||
| 2422 | #[doc = "SYSCFG compensation cell value register"] | ||
| 2423 | pub fn ccvr(self) -> Reg<regs::Ccvr, R> { | ||
| 2424 | unsafe { Reg::from_ptr(self.0.add(36usize)) } | ||
| 2425 | } | ||
| 2426 | #[doc = "SYSCFG compensation cell code register"] | ||
| 2427 | pub fn cccr(self) -> Reg<regs::Cccr, RW> { | ||
| 2428 | unsafe { Reg::from_ptr(self.0.add(40usize)) } | ||
| 2429 | } | ||
| 2430 | #[doc = "SYSCFG power control register"] | ||
| 2431 | pub fn pwrcr(self) -> Reg<regs::Pwrcr, RW> { | ||
| 2432 | unsafe { Reg::from_ptr(self.0.add(44usize)) } | ||
| 2433 | } | ||
| 2434 | #[doc = "SYSCFG package register"] | ||
| 2435 | pub fn pkgr(self) -> Reg<regs::Pkgr, R> { | ||
| 2436 | unsafe { Reg::from_ptr(self.0.add(292usize)) } | ||
| 2437 | } | ||
| 2438 | #[doc = "SYSCFG user register 0"] | ||
| 2439 | pub fn ur0(self) -> Reg<regs::Ur0, R> { | ||
| 2440 | unsafe { Reg::from_ptr(self.0.add(768usize)) } | ||
| 2441 | } | ||
| 2442 | #[doc = "SYSCFG user register 2"] | ||
| 2443 | pub fn ur2(self) -> Reg<regs::Ur2, RW> { | ||
| 2444 | unsafe { Reg::from_ptr(self.0.add(776usize)) } | ||
| 2445 | } | ||
| 2446 | #[doc = "SYSCFG user register 3"] | ||
| 2447 | pub fn ur3(self) -> Reg<regs::Ur3, RW> { | ||
| 2448 | unsafe { Reg::from_ptr(self.0.add(780usize)) } | ||
| 2449 | } | ||
| 2450 | #[doc = "SYSCFG user register 4"] | ||
| 2451 | pub fn ur4(self) -> Reg<regs::Ur4, R> { | ||
| 2452 | unsafe { Reg::from_ptr(self.0.add(784usize)) } | ||
| 2453 | } | ||
| 2454 | #[doc = "SYSCFG user register 5"] | ||
| 2455 | pub fn ur5(self) -> Reg<regs::Ur5, R> { | ||
| 2456 | unsafe { Reg::from_ptr(self.0.add(788usize)) } | ||
| 2457 | } | ||
| 2458 | #[doc = "SYSCFG user register 6"] | ||
| 2459 | pub fn ur6(self) -> Reg<regs::Ur6, R> { | ||
| 2460 | unsafe { Reg::from_ptr(self.0.add(792usize)) } | ||
| 2461 | } | ||
| 2462 | #[doc = "SYSCFG user register 7"] | ||
| 2463 | pub fn ur7(self) -> Reg<regs::Ur7, R> { | ||
| 2464 | unsafe { Reg::from_ptr(self.0.add(796usize)) } | ||
| 2465 | } | ||
| 2466 | #[doc = "SYSCFG user register 8"] | ||
| 2467 | pub fn ur8(self) -> Reg<regs::Ur8, R> { | ||
| 2468 | unsafe { Reg::from_ptr(self.0.add(800usize)) } | ||
| 2469 | } | ||
| 2470 | #[doc = "SYSCFG user register 9"] | ||
| 2471 | pub fn ur9(self) -> Reg<regs::Ur9, R> { | ||
| 2472 | unsafe { Reg::from_ptr(self.0.add(804usize)) } | ||
| 2473 | } | ||
| 2474 | #[doc = "SYSCFG user register 10"] | ||
| 2475 | pub fn ur10(self) -> Reg<regs::Ur10, R> { | ||
| 2476 | unsafe { Reg::from_ptr(self.0.add(808usize)) } | ||
| 2477 | } | ||
| 2478 | #[doc = "SYSCFG user register 11"] | ||
| 2479 | pub fn ur11(self) -> Reg<regs::Ur11, R> { | ||
| 2480 | unsafe { Reg::from_ptr(self.0.add(812usize)) } | ||
| 2481 | } | ||
| 2482 | #[doc = "SYSCFG user register 12"] | ||
| 2483 | pub fn ur12(self) -> Reg<regs::Ur12, R> { | ||
| 2484 | unsafe { Reg::from_ptr(self.0.add(816usize)) } | ||
| 2485 | } | ||
| 2486 | #[doc = "SYSCFG user register 13"] | ||
| 2487 | pub fn ur13(self) -> Reg<regs::Ur13, R> { | ||
| 2488 | unsafe { Reg::from_ptr(self.0.add(820usize)) } | ||
| 2489 | } | ||
| 2490 | #[doc = "SYSCFG user register 14"] | ||
| 2491 | pub fn ur14(self) -> Reg<regs::Ur14, RW> { | ||
| 2492 | unsafe { Reg::from_ptr(self.0.add(824usize)) } | ||
| 2493 | } | ||
| 2494 | #[doc = "SYSCFG user register 15"] | ||
| 2495 | pub fn ur15(self) -> Reg<regs::Ur15, R> { | ||
| 2496 | unsafe { Reg::from_ptr(self.0.add(828usize)) } | ||
| 2497 | } | ||
| 2498 | #[doc = "SYSCFG user register 16"] | ||
| 2499 | pub fn ur16(self) -> Reg<regs::Ur16, R> { | ||
| 2500 | unsafe { Reg::from_ptr(self.0.add(832usize)) } | ||
| 2501 | } | ||
| 2502 | #[doc = "SYSCFG user register 17"] | ||
| 2503 | pub fn ur17(self) -> Reg<regs::Ur17, R> { | ||
| 2504 | unsafe { Reg::from_ptr(self.0.add(836usize)) } | ||
| 2016 | } | 2505 | } |
| 2017 | } | 2506 | } |
| 2018 | pub mod regs { | 2507 | pub mod regs { |
| 2019 | use crate::generic::*; | 2508 | use crate::generic::*; |
| 2020 | #[doc = "status register"] | 2509 | #[doc = "SYSCFG user register 15"] |
| 2021 | #[repr(transparent)] | 2510 | #[repr(transparent)] |
| 2022 | #[derive(Copy, Clone, Eq, PartialEq)] | 2511 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2023 | pub struct Sr(pub u32); | 2512 | pub struct Ur15(pub u32); |
| 2024 | impl Sr { | 2513 | impl Ur15 { |
| 2025 | #[doc = "Data ready"] | 2514 | #[doc = "Freeze independent watchdog in Standby mode"] |
| 2026 | pub const fn drdy(&self) -> bool { | 2515 | pub const fn fziwdgstb(&self) -> bool { |
| 2027 | let val = (self.0 >> 0usize) & 0x01; | 2516 | let val = (self.0 >> 16usize) & 0x01; |
| 2028 | val != 0 | 2517 | val != 0 |
| 2029 | } | 2518 | } |
| 2030 | #[doc = "Data ready"] | 2519 | #[doc = "Freeze independent watchdog in Standby mode"] |
| 2031 | pub fn set_drdy(&mut self, val: bool) { | 2520 | pub fn set_fziwdgstb(&mut self, val: bool) { |
| 2032 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 2521 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); |
| 2033 | } | 2522 | } |
| 2034 | #[doc = "Clock error current status"] | 2523 | } |
| 2035 | pub const fn cecs(&self) -> bool { | 2524 | impl Default for Ur15 { |
| 2036 | let val = (self.0 >> 1usize) & 0x01; | 2525 | fn default() -> Ur15 { |
| 2526 | Ur15(0) | ||
| 2527 | } | ||
| 2528 | } | ||
| 2529 | #[doc = "SYSCFG user register 5"] | ||
| 2530 | #[repr(transparent)] | ||
| 2531 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2532 | pub struct Ur5(pub u32); | ||
| 2533 | impl Ur5 { | ||
| 2534 | #[doc = "Mass erase secured area disabled for bank 1"] | ||
| 2535 | pub const fn mesad_1(&self) -> bool { | ||
| 2536 | let val = (self.0 >> 0usize) & 0x01; | ||
| 2037 | val != 0 | 2537 | val != 0 |
| 2038 | } | 2538 | } |
| 2039 | #[doc = "Clock error current status"] | 2539 | #[doc = "Mass erase secured area disabled for bank 1"] |
| 2040 | pub fn set_cecs(&mut self, val: bool) { | 2540 | pub fn set_mesad_1(&mut self, val: bool) { |
| 2041 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 2541 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 2042 | } | 2542 | } |
| 2043 | #[doc = "Seed error current status"] | 2543 | #[doc = "Write protection for flash bank 1"] |
| 2044 | pub const fn secs(&self) -> bool { | 2544 | pub const fn wrpn_1(&self) -> u8 { |
| 2045 | let val = (self.0 >> 2usize) & 0x01; | 2545 | let val = (self.0 >> 16usize) & 0xff; |
| 2046 | val != 0 | 2546 | val as u8 |
| 2047 | } | 2547 | } |
| 2048 | #[doc = "Seed error current status"] | 2548 | #[doc = "Write protection for flash bank 1"] |
| 2049 | pub fn set_secs(&mut self, val: bool) { | 2549 | pub fn set_wrpn_1(&mut self, val: u8) { |
| 2050 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | 2550 | self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); |
| 2051 | } | 2551 | } |
| 2052 | #[doc = "Clock error interrupt status"] | 2552 | } |
| 2053 | pub const fn ceis(&self) -> bool { | 2553 | impl Default for Ur5 { |
| 2054 | let val = (self.0 >> 5usize) & 0x01; | 2554 | fn default() -> Ur5 { |
| 2555 | Ur5(0) | ||
| 2556 | } | ||
| 2557 | } | ||
| 2558 | #[doc = "SYSCFG user register 16"] | ||
| 2559 | #[repr(transparent)] | ||
| 2560 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2561 | pub struct Ur16(pub u32); | ||
| 2562 | impl Ur16 { | ||
| 2563 | #[doc = "Freeze independent watchdog in Stop mode"] | ||
| 2564 | pub const fn fziwdgstp(&self) -> bool { | ||
| 2565 | let val = (self.0 >> 0usize) & 0x01; | ||
| 2055 | val != 0 | 2566 | val != 0 |
| 2056 | } | 2567 | } |
| 2057 | #[doc = "Clock error interrupt status"] | 2568 | #[doc = "Freeze independent watchdog in Stop mode"] |
| 2058 | pub fn set_ceis(&mut self, val: bool) { | 2569 | pub fn set_fziwdgstp(&mut self, val: bool) { |
| 2059 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | 2570 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 2060 | } | 2571 | } |
| 2061 | #[doc = "Seed error interrupt status"] | 2572 | #[doc = "Private key programmed"] |
| 2062 | pub const fn seis(&self) -> bool { | 2573 | pub const fn pkp(&self) -> bool { |
| 2063 | let val = (self.0 >> 6usize) & 0x01; | 2574 | let val = (self.0 >> 16usize) & 0x01; |
| 2064 | val != 0 | 2575 | val != 0 |
| 2065 | } | 2576 | } |
| 2066 | #[doc = "Seed error interrupt status"] | 2577 | #[doc = "Private key programmed"] |
| 2067 | pub fn set_seis(&mut self, val: bool) { | 2578 | pub fn set_pkp(&mut self, val: bool) { |
| 2068 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 2579 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); |
| 2069 | } | 2580 | } |
| 2070 | } | 2581 | } |
| 2071 | impl Default for Sr { | 2582 | impl Default for Ur16 { |
| 2072 | fn default() -> Sr { | 2583 | fn default() -> Ur16 { |
| 2073 | Sr(0) | 2584 | Ur16(0) |
| 2074 | } | 2585 | } |
| 2075 | } | 2586 | } |
| 2076 | #[doc = "control register"] | 2587 | #[doc = "SYSCFG user register 13"] |
| 2077 | #[repr(transparent)] | 2588 | #[repr(transparent)] |
| 2078 | #[derive(Copy, Clone, Eq, PartialEq)] | 2589 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2079 | pub struct Cr(pub u32); | 2590 | pub struct Ur13(pub u32); |
| 2080 | impl Cr { | 2591 | impl Ur13 { |
| 2081 | #[doc = "Random number generator enable"] | 2592 | #[doc = "Secured DTCM RAM Size"] |
| 2082 | pub const fn rngen(&self) -> bool { | 2593 | pub const fn sdrs(&self) -> u8 { |
| 2083 | let val = (self.0 >> 2usize) & 0x01; | 2594 | let val = (self.0 >> 0usize) & 0x03; |
| 2084 | val != 0 | 2595 | val as u8 |
| 2085 | } | 2596 | } |
| 2086 | #[doc = "Random number generator enable"] | 2597 | #[doc = "Secured DTCM RAM Size"] |
| 2087 | pub fn set_rngen(&mut self, val: bool) { | 2598 | pub fn set_sdrs(&mut self, val: u8) { |
| 2088 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | 2599 | self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); |
| 2089 | } | 2600 | } |
| 2090 | #[doc = "Interrupt enable"] | 2601 | #[doc = "D1 Standby reset"] |
| 2091 | pub const fn ie(&self) -> bool { | 2602 | pub const fn d1sbrst(&self) -> bool { |
| 2092 | let val = (self.0 >> 3usize) & 0x01; | 2603 | let val = (self.0 >> 16usize) & 0x01; |
| 2093 | val != 0 | 2604 | val != 0 |
| 2094 | } | 2605 | } |
| 2095 | #[doc = "Interrupt enable"] | 2606 | #[doc = "D1 Standby reset"] |
| 2096 | pub fn set_ie(&mut self, val: bool) { | 2607 | pub fn set_d1sbrst(&mut self, val: bool) { |
| 2097 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | 2608 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); |
| 2098 | } | 2609 | } |
| 2099 | } | 2610 | } |
| 2100 | impl Default for Cr { | 2611 | impl Default for Ur13 { |
| 2101 | fn default() -> Cr { | 2612 | fn default() -> Ur13 { |
| 2102 | Cr(0) | 2613 | Ur13(0) |
| 2103 | } | 2614 | } |
| 2104 | } | 2615 | } |
| 2105 | } | 2616 | #[doc = "SYSCFG user register 17"] |
| 2106 | } | 2617 | #[repr(transparent)] |
| 2107 | pub mod spi_v1 { | 2618 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2108 | use crate::generic::*; | 2619 | pub struct Ur17(pub u32); |
| 2109 | #[doc = "Serial peripheral interface"] | 2620 | impl Ur17 { |
| 2110 | #[derive(Copy, Clone)] | 2621 | #[doc = "I/O high speed / low voltage"] |
| 2111 | pub struct Spi(pub *mut u8); | 2622 | pub const fn io_hslv(&self) -> bool { |
| 2112 | unsafe impl Send for Spi {} | 2623 | let val = (self.0 >> 0usize) & 0x01; |
| 2113 | unsafe impl Sync for Spi {} | 2624 | val != 0 |
| 2114 | impl Spi { | 2625 | } |
| 2115 | #[doc = "control register 1"] | 2626 | #[doc = "I/O high speed / low voltage"] |
| 2116 | pub fn cr1(self) -> Reg<regs::Cr1, RW> { | 2627 | pub fn set_io_hslv(&mut self, val: bool) { |
| 2117 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | 2628 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 2118 | } | 2629 | } |
| 2119 | #[doc = "control register 2"] | ||
| 2120 | pub fn cr2(self) -> Reg<regs::Cr2, RW> { | ||
| 2121 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 2122 | } | 2630 | } |
| 2123 | #[doc = "status register"] | 2631 | impl Default for Ur17 { |
| 2124 | pub fn sr(self) -> Reg<regs::Sr, RW> { | 2632 | fn default() -> Ur17 { |
| 2125 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | 2633 | Ur17(0) |
| 2634 | } | ||
| 2126 | } | 2635 | } |
| 2127 | #[doc = "data register"] | 2636 | #[doc = "SYSCFG user register 9"] |
| 2128 | pub fn dr(self) -> Reg<regs::Dr, RW> { | 2637 | #[repr(transparent)] |
| 2129 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | 2638 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2639 | pub struct Ur9(pub u32); | ||
| 2640 | impl Ur9 { | ||
| 2641 | #[doc = "Write protection for flash bank 2"] | ||
| 2642 | pub const fn wrpn_2(&self) -> u8 { | ||
| 2643 | let val = (self.0 >> 0usize) & 0xff; | ||
| 2644 | val as u8 | ||
| 2645 | } | ||
| 2646 | #[doc = "Write protection for flash bank 2"] | ||
| 2647 | pub fn set_wrpn_2(&mut self, val: u8) { | ||
| 2648 | self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); | ||
| 2649 | } | ||
| 2650 | #[doc = "Protected area start address for bank 2"] | ||
| 2651 | pub const fn pa_beg_2(&self) -> u16 { | ||
| 2652 | let val = (self.0 >> 16usize) & 0x0fff; | ||
| 2653 | val as u16 | ||
| 2654 | } | ||
| 2655 | #[doc = "Protected area start address for bank 2"] | ||
| 2656 | pub fn set_pa_beg_2(&mut self, val: u16) { | ||
| 2657 | self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); | ||
| 2658 | } | ||
| 2130 | } | 2659 | } |
| 2131 | #[doc = "CRC polynomial register"] | 2660 | impl Default for Ur9 { |
| 2132 | pub fn crcpr(self) -> Reg<regs::Crcpr, RW> { | 2661 | fn default() -> Ur9 { |
| 2133 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | 2662 | Ur9(0) |
| 2663 | } | ||
| 2134 | } | 2664 | } |
| 2135 | #[doc = "RX CRC register"] | 2665 | #[doc = "SYSCFG user register 10"] |
| 2136 | pub fn rxcrcr(self) -> Reg<regs::Rxcrcr, R> { | 2666 | #[repr(transparent)] |
| 2137 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | 2667 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2668 | pub struct Ur10(pub u32); | ||
| 2669 | impl Ur10 { | ||
| 2670 | #[doc = "Protected area end address for bank 2"] | ||
| 2671 | pub const fn pa_end_2(&self) -> u16 { | ||
| 2672 | let val = (self.0 >> 0usize) & 0x0fff; | ||
| 2673 | val as u16 | ||
| 2674 | } | ||
| 2675 | #[doc = "Protected area end address for bank 2"] | ||
| 2676 | pub fn set_pa_end_2(&mut self, val: u16) { | ||
| 2677 | self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); | ||
| 2678 | } | ||
| 2679 | #[doc = "Secured area start address for bank 2"] | ||
| 2680 | pub const fn sa_beg_2(&self) -> u16 { | ||
| 2681 | let val = (self.0 >> 16usize) & 0x0fff; | ||
| 2682 | val as u16 | ||
| 2683 | } | ||
| 2684 | #[doc = "Secured area start address for bank 2"] | ||
| 2685 | pub fn set_sa_beg_2(&mut self, val: u16) { | ||
| 2686 | self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); | ||
| 2687 | } | ||
| 2138 | } | 2688 | } |
| 2139 | #[doc = "TX CRC register"] | 2689 | impl Default for Ur10 { |
| 2140 | pub fn txcrcr(self) -> Reg<regs::Txcrcr, R> { | 2690 | fn default() -> Ur10 { |
| 2141 | unsafe { Reg::from_ptr(self.0.add(24usize)) } | 2691 | Ur10(0) |
| 2692 | } | ||
| 2142 | } | 2693 | } |
| 2143 | } | 2694 | #[doc = "SYSCFG package register"] |
| 2144 | pub mod regs { | ||
| 2145 | use crate::generic::*; | ||
| 2146 | #[doc = "TX CRC register"] | ||
| 2147 | #[repr(transparent)] | 2695 | #[repr(transparent)] |
| 2148 | #[derive(Copy, Clone, Eq, PartialEq)] | 2696 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2149 | pub struct Txcrcr(pub u32); | 2697 | pub struct Pkgr(pub u32); |
| 2150 | impl Txcrcr { | 2698 | impl Pkgr { |
| 2151 | #[doc = "Tx CRC register"] | 2699 | #[doc = "Package"] |
| 2152 | pub const fn tx_crc(&self) -> u16 { | 2700 | pub const fn pkg(&self) -> u8 { |
| 2153 | let val = (self.0 >> 0usize) & 0xffff; | 2701 | let val = (self.0 >> 0usize) & 0x0f; |
| 2154 | val as u16 | 2702 | val as u8 |
| 2155 | } | 2703 | } |
| 2156 | #[doc = "Tx CRC register"] | 2704 | #[doc = "Package"] |
| 2157 | pub fn set_tx_crc(&mut self, val: u16) { | 2705 | pub fn set_pkg(&mut self, val: u8) { |
| 2158 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | 2706 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); |
| 2159 | } | 2707 | } |
| 2160 | } | 2708 | } |
| 2161 | impl Default for Txcrcr { | 2709 | impl Default for Pkgr { |
| 2162 | fn default() -> Txcrcr { | 2710 | fn default() -> Pkgr { |
| 2163 | Txcrcr(0) | 2711 | Pkgr(0) |
| 2164 | } | 2712 | } |
| 2165 | } | 2713 | } |
| 2166 | #[doc = "status register"] | 2714 | #[doc = "SYSCFG user register 4"] |
| 2167 | #[repr(transparent)] | 2715 | #[repr(transparent)] |
| 2168 | #[derive(Copy, Clone, Eq, PartialEq)] | 2716 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2169 | pub struct Sr(pub u32); | 2717 | pub struct Ur4(pub u32); |
| 2170 | impl Sr { | 2718 | impl Ur4 { |
| 2171 | #[doc = "Receive buffer not empty"] | 2719 | #[doc = "Mass Erase Protected Area Disabled for bank 1"] |
| 2172 | pub const fn rxne(&self) -> bool { | 2720 | pub const fn mepad_1(&self) -> bool { |
| 2173 | let val = (self.0 >> 0usize) & 0x01; | 2721 | let val = (self.0 >> 16usize) & 0x01; |
| 2174 | val != 0 | 2722 | val != 0 |
| 2175 | } | 2723 | } |
| 2176 | #[doc = "Receive buffer not empty"] | 2724 | #[doc = "Mass Erase Protected Area Disabled for bank 1"] |
| 2177 | pub fn set_rxne(&mut self, val: bool) { | 2725 | pub fn set_mepad_1(&mut self, val: bool) { |
| 2178 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 2726 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); |
| 2179 | } | 2727 | } |
| 2180 | #[doc = "Transmit buffer empty"] | 2728 | } |
| 2181 | pub const fn txe(&self) -> bool { | 2729 | impl Default for Ur4 { |
| 2182 | let val = (self.0 >> 1usize) & 0x01; | 2730 | fn default() -> Ur4 { |
| 2183 | val != 0 | 2731 | Ur4(0) |
| 2184 | } | 2732 | } |
| 2185 | #[doc = "Transmit buffer empty"] | 2733 | } |
| 2186 | pub fn set_txe(&mut self, val: bool) { | 2734 | #[doc = "SYSCFG compensation cell value register"] |
| 2187 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 2735 | #[repr(transparent)] |
| 2736 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2737 | pub struct Ccvr(pub u32); | ||
| 2738 | impl Ccvr { | ||
| 2739 | #[doc = "NMOS compensation value"] | ||
| 2740 | pub const fn ncv(&self) -> u8 { | ||
| 2741 | let val = (self.0 >> 0usize) & 0x0f; | ||
| 2742 | val as u8 | ||
| 2188 | } | 2743 | } |
| 2189 | #[doc = "CRC error flag"] | 2744 | #[doc = "NMOS compensation value"] |
| 2190 | pub const fn crcerr(&self) -> bool { | 2745 | pub fn set_ncv(&mut self, val: u8) { |
| 2191 | let val = (self.0 >> 4usize) & 0x01; | 2746 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); |
| 2192 | val != 0 | ||
| 2193 | } | 2747 | } |
| 2194 | #[doc = "CRC error flag"] | 2748 | #[doc = "PMOS compensation value"] |
| 2195 | pub fn set_crcerr(&mut self, val: bool) { | 2749 | pub const fn pcv(&self) -> u8 { |
| 2196 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | 2750 | let val = (self.0 >> 4usize) & 0x0f; |
| 2751 | val as u8 | ||
| 2197 | } | 2752 | } |
| 2198 | #[doc = "Mode fault"] | 2753 | #[doc = "PMOS compensation value"] |
| 2199 | pub const fn modf(&self) -> bool { | 2754 | pub fn set_pcv(&mut self, val: u8) { |
| 2200 | let val = (self.0 >> 5usize) & 0x01; | 2755 | self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); |
| 2756 | } | ||
| 2757 | } | ||
| 2758 | impl Default for Ccvr { | ||
| 2759 | fn default() -> Ccvr { | ||
| 2760 | Ccvr(0) | ||
| 2761 | } | ||
| 2762 | } | ||
| 2763 | #[doc = "SYSCFG user register 11"] | ||
| 2764 | #[repr(transparent)] | ||
| 2765 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2766 | pub struct Ur11(pub u32); | ||
| 2767 | impl Ur11 { | ||
| 2768 | #[doc = "Secured area end address for bank 2"] | ||
| 2769 | pub const fn sa_end_2(&self) -> u16 { | ||
| 2770 | let val = (self.0 >> 0usize) & 0x0fff; | ||
| 2771 | val as u16 | ||
| 2772 | } | ||
| 2773 | #[doc = "Secured area end address for bank 2"] | ||
| 2774 | pub fn set_sa_end_2(&mut self, val: u16) { | ||
| 2775 | self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); | ||
| 2776 | } | ||
| 2777 | #[doc = "Independent Watchdog 1 mode"] | ||
| 2778 | pub const fn iwdg1m(&self) -> bool { | ||
| 2779 | let val = (self.0 >> 16usize) & 0x01; | ||
| 2201 | val != 0 | 2780 | val != 0 |
| 2202 | } | 2781 | } |
| 2203 | #[doc = "Mode fault"] | 2782 | #[doc = "Independent Watchdog 1 mode"] |
| 2204 | pub fn set_modf(&mut self, val: bool) { | 2783 | pub fn set_iwdg1m(&mut self, val: bool) { |
| 2205 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | 2784 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); |
| 2206 | } | 2785 | } |
| 2207 | #[doc = "Overrun flag"] | 2786 | } |
| 2208 | pub const fn ovr(&self) -> bool { | 2787 | impl Default for Ur11 { |
| 2209 | let val = (self.0 >> 6usize) & 0x01; | 2788 | fn default() -> Ur11 { |
| 2789 | Ur11(0) | ||
| 2790 | } | ||
| 2791 | } | ||
| 2792 | #[doc = "compensation cell control/status register"] | ||
| 2793 | #[repr(transparent)] | ||
| 2794 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2795 | pub struct Cccsr(pub u32); | ||
| 2796 | impl Cccsr { | ||
| 2797 | #[doc = "enable"] | ||
| 2798 | pub const fn en(&self) -> bool { | ||
| 2799 | let val = (self.0 >> 0usize) & 0x01; | ||
| 2210 | val != 0 | 2800 | val != 0 |
| 2211 | } | 2801 | } |
| 2212 | #[doc = "Overrun flag"] | 2802 | #[doc = "enable"] |
| 2213 | pub fn set_ovr(&mut self, val: bool) { | 2803 | pub fn set_en(&mut self, val: bool) { |
| 2214 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 2804 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 2215 | } | 2805 | } |
| 2216 | #[doc = "Busy flag"] | 2806 | #[doc = "Code selection"] |
| 2217 | pub const fn bsy(&self) -> bool { | 2807 | pub const fn cs(&self) -> bool { |
| 2218 | let val = (self.0 >> 7usize) & 0x01; | 2808 | let val = (self.0 >> 1usize) & 0x01; |
| 2219 | val != 0 | 2809 | val != 0 |
| 2220 | } | 2810 | } |
| 2221 | #[doc = "Busy flag"] | 2811 | #[doc = "Code selection"] |
| 2222 | pub fn set_bsy(&mut self, val: bool) { | 2812 | pub fn set_cs(&mut self, val: bool) { |
| 2223 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | 2813 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 2224 | } | 2814 | } |
| 2225 | #[doc = "TI frame format error"] | 2815 | #[doc = "Compensation cell ready flag"] |
| 2226 | pub const fn fre(&self) -> bool { | 2816 | pub const fn ready(&self) -> bool { |
| 2227 | let val = (self.0 >> 8usize) & 0x01; | 2817 | let val = (self.0 >> 8usize) & 0x01; |
| 2228 | val != 0 | 2818 | val != 0 |
| 2229 | } | 2819 | } |
| 2230 | #[doc = "TI frame format error"] | 2820 | #[doc = "Compensation cell ready flag"] |
| 2231 | pub fn set_fre(&mut self, val: bool) { | 2821 | pub fn set_ready(&mut self, val: bool) { |
| 2232 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 2822 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 2233 | } | 2823 | } |
| 2824 | #[doc = "High-speed at low-voltage"] | ||
| 2825 | pub const fn hslv(&self) -> bool { | ||
| 2826 | let val = (self.0 >> 16usize) & 0x01; | ||
| 2827 | val != 0 | ||
| 2828 | } | ||
| 2829 | #[doc = "High-speed at low-voltage"] | ||
| 2830 | pub fn set_hslv(&mut self, val: bool) { | ||
| 2831 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | ||
| 2832 | } | ||
| 2234 | } | 2833 | } |
| 2235 | impl Default for Sr { | 2834 | impl Default for Cccsr { |
| 2236 | fn default() -> Sr { | 2835 | fn default() -> Cccsr { |
| 2237 | Sr(0) | 2836 | Cccsr(0) |
| 2238 | } | 2837 | } |
| 2239 | } | 2838 | } |
| 2240 | #[doc = "control register 1"] | 2839 | #[doc = "SYSCFG user register 14"] |
| 2241 | #[repr(transparent)] | 2840 | #[repr(transparent)] |
| 2242 | #[derive(Copy, Clone, Eq, PartialEq)] | 2841 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2243 | pub struct Cr1(pub u32); | 2842 | pub struct Ur14(pub u32); |
| 2244 | impl Cr1 { | 2843 | impl Ur14 { |
| 2245 | #[doc = "Clock phase"] | 2844 | #[doc = "D1 Stop Reset"] |
| 2246 | pub const fn cpha(&self) -> super::vals::Cpha { | 2845 | pub const fn d1stprst(&self) -> bool { |
| 2247 | let val = (self.0 >> 0usize) & 0x01; | 2846 | let val = (self.0 >> 0usize) & 0x01; |
| 2248 | super::vals::Cpha(val as u8) | 2847 | val != 0 |
| 2249 | } | ||
| 2250 | #[doc = "Clock phase"] | ||
| 2251 | pub fn set_cpha(&mut self, val: super::vals::Cpha) { | ||
| 2252 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val.0 as u32) & 0x01) << 0usize); | ||
| 2253 | } | ||
| 2254 | #[doc = "Clock polarity"] | ||
| 2255 | pub const fn cpol(&self) -> super::vals::Cpol { | ||
| 2256 | let val = (self.0 >> 1usize) & 0x01; | ||
| 2257 | super::vals::Cpol(val as u8) | ||
| 2258 | } | ||
| 2259 | #[doc = "Clock polarity"] | ||
| 2260 | pub fn set_cpol(&mut self, val: super::vals::Cpol) { | ||
| 2261 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val.0 as u32) & 0x01) << 1usize); | ||
| 2262 | } | 2848 | } |
| 2263 | #[doc = "Master selection"] | 2849 | #[doc = "D1 Stop Reset"] |
| 2264 | pub const fn mstr(&self) -> super::vals::Mstr { | 2850 | pub fn set_d1stprst(&mut self, val: bool) { |
| 2265 | let val = (self.0 >> 2usize) & 0x01; | 2851 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 2266 | super::vals::Mstr(val as u8) | ||
| 2267 | } | 2852 | } |
| 2268 | #[doc = "Master selection"] | 2853 | } |
| 2269 | pub fn set_mstr(&mut self, val: super::vals::Mstr) { | 2854 | impl Default for Ur14 { |
| 2270 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); | 2855 | fn default() -> Ur14 { |
| 2856 | Ur14(0) | ||
| 2271 | } | 2857 | } |
| 2272 | #[doc = "Baud rate control"] | 2858 | } |
| 2273 | pub const fn br(&self) -> super::vals::Br { | 2859 | #[doc = "SYSCFG user register 0"] |
| 2274 | let val = (self.0 >> 3usize) & 0x07; | 2860 | #[repr(transparent)] |
| 2275 | super::vals::Br(val as u8) | 2861 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2862 | pub struct Ur0(pub u32); | ||
| 2863 | impl Ur0 { | ||
| 2864 | #[doc = "Bank Swap"] | ||
| 2865 | pub const fn bks(&self) -> bool { | ||
| 2866 | let val = (self.0 >> 0usize) & 0x01; | ||
| 2867 | val != 0 | ||
| 2276 | } | 2868 | } |
| 2277 | #[doc = "Baud rate control"] | 2869 | #[doc = "Bank Swap"] |
| 2278 | pub fn set_br(&mut self, val: super::vals::Br) { | 2870 | pub fn set_bks(&mut self, val: bool) { |
| 2279 | self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize); | 2871 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 2280 | } | 2872 | } |
| 2281 | #[doc = "SPI enable"] | 2873 | #[doc = "Readout protection"] |
| 2282 | pub const fn spe(&self) -> bool { | 2874 | pub const fn rdp(&self) -> u8 { |
| 2283 | let val = (self.0 >> 6usize) & 0x01; | 2875 | let val = (self.0 >> 16usize) & 0xff; |
| 2284 | val != 0 | 2876 | val as u8 |
| 2285 | } | 2877 | } |
| 2286 | #[doc = "SPI enable"] | 2878 | #[doc = "Readout protection"] |
| 2287 | pub fn set_spe(&mut self, val: bool) { | 2879 | pub fn set_rdp(&mut self, val: u8) { |
| 2288 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 2880 | self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); |
| 2289 | } | 2881 | } |
| 2290 | #[doc = "Frame format"] | 2882 | } |
| 2291 | pub const fn lsbfirst(&self) -> super::vals::Lsbfirst { | 2883 | impl Default for Ur0 { |
| 2292 | let val = (self.0 >> 7usize) & 0x01; | 2884 | fn default() -> Ur0 { |
| 2293 | super::vals::Lsbfirst(val as u8) | 2885 | Ur0(0) |
| 2294 | } | 2886 | } |
| 2295 | #[doc = "Frame format"] | 2887 | } |
| 2296 | pub fn set_lsbfirst(&mut self, val: super::vals::Lsbfirst) { | 2888 | #[doc = "SYSCFG user register 2"] |
| 2297 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); | 2889 | #[repr(transparent)] |
| 2890 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2891 | pub struct Ur2(pub u32); | ||
| 2892 | impl Ur2 { | ||
| 2893 | #[doc = "BOR_LVL Brownout Reset Threshold Level"] | ||
| 2894 | pub const fn borh(&self) -> u8 { | ||
| 2895 | let val = (self.0 >> 0usize) & 0x03; | ||
| 2896 | val as u8 | ||
| 2298 | } | 2897 | } |
| 2299 | #[doc = "Internal slave select"] | 2898 | #[doc = "BOR_LVL Brownout Reset Threshold Level"] |
| 2300 | pub const fn ssi(&self) -> bool { | 2899 | pub fn set_borh(&mut self, val: u8) { |
| 2301 | let val = (self.0 >> 8usize) & 0x01; | 2900 | self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); |
| 2302 | val != 0 | ||
| 2303 | } | 2901 | } |
| 2304 | #[doc = "Internal slave select"] | 2902 | #[doc = "Boot Address 0"] |
| 2305 | pub fn set_ssi(&mut self, val: bool) { | 2903 | pub const fn boot_add0(&self) -> u16 { |
| 2306 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 2904 | let val = (self.0 >> 16usize) & 0xffff; |
| 2905 | val as u16 | ||
| 2307 | } | 2906 | } |
| 2308 | #[doc = "Software slave management"] | 2907 | #[doc = "Boot Address 0"] |
| 2309 | pub const fn ssm(&self) -> bool { | 2908 | pub fn set_boot_add0(&mut self, val: u16) { |
| 2310 | let val = (self.0 >> 9usize) & 0x01; | 2909 | self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize); |
| 2311 | val != 0 | ||
| 2312 | } | 2910 | } |
| 2313 | #[doc = "Software slave management"] | 2911 | } |
| 2314 | pub fn set_ssm(&mut self, val: bool) { | 2912 | impl Default for Ur2 { |
| 2315 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); | 2913 | fn default() -> Ur2 { |
| 2914 | Ur2(0) | ||
| 2316 | } | 2915 | } |
| 2317 | #[doc = "Receive only"] | 2916 | } |
| 2318 | pub const fn rxonly(&self) -> super::vals::Rxonly { | 2917 | #[doc = "external interrupt configuration register 2"] |
| 2319 | let val = (self.0 >> 10usize) & 0x01; | 2918 | #[repr(transparent)] |
| 2320 | super::vals::Rxonly(val as u8) | 2919 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2920 | pub struct Exticr(pub u32); | ||
| 2921 | impl Exticr { | ||
| 2922 | #[doc = "EXTI x configuration (x = 4 to 7)"] | ||
| 2923 | pub fn exti(&self, n: usize) -> u8 { | ||
| 2924 | assert!(n < 4usize); | ||
| 2925 | let offs = 0usize + n * 4usize; | ||
| 2926 | let val = (self.0 >> offs) & 0x0f; | ||
| 2927 | val as u8 | ||
| 2321 | } | 2928 | } |
| 2322 | #[doc = "Receive only"] | 2929 | #[doc = "EXTI x configuration (x = 4 to 7)"] |
| 2323 | pub fn set_rxonly(&mut self, val: super::vals::Rxonly) { | 2930 | pub fn set_exti(&mut self, n: usize, val: u8) { |
| 2324 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); | 2931 | assert!(n < 4usize); |
| 2932 | let offs = 0usize + n * 4usize; | ||
| 2933 | self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs); | ||
| 2325 | } | 2934 | } |
| 2326 | #[doc = "Data frame format"] | 2935 | } |
| 2327 | pub const fn dff(&self) -> super::vals::Dff { | 2936 | impl Default for Exticr { |
| 2328 | let val = (self.0 >> 11usize) & 0x01; | 2937 | fn default() -> Exticr { |
| 2329 | super::vals::Dff(val as u8) | 2938 | Exticr(0) |
| 2330 | } | 2939 | } |
| 2331 | #[doc = "Data frame format"] | 2940 | } |
| 2332 | pub fn set_dff(&mut self, val: super::vals::Dff) { | 2941 | #[doc = "SYSCFG user register 6"] |
| 2333 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize); | 2942 | #[repr(transparent)] |
| 2943 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2944 | pub struct Ur6(pub u32); | ||
| 2945 | impl Ur6 { | ||
| 2946 | #[doc = "Protected area start address for bank 1"] | ||
| 2947 | pub const fn pa_beg_1(&self) -> u16 { | ||
| 2948 | let val = (self.0 >> 0usize) & 0x0fff; | ||
| 2949 | val as u16 | ||
| 2334 | } | 2950 | } |
| 2335 | #[doc = "CRC transfer next"] | 2951 | #[doc = "Protected area start address for bank 1"] |
| 2336 | pub const fn crcnext(&self) -> super::vals::Crcnext { | 2952 | pub fn set_pa_beg_1(&mut self, val: u16) { |
| 2337 | let val = (self.0 >> 12usize) & 0x01; | 2953 | self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); |
| 2338 | super::vals::Crcnext(val as u8) | ||
| 2339 | } | 2954 | } |
| 2340 | #[doc = "CRC transfer next"] | 2955 | #[doc = "Protected area end address for bank 1"] |
| 2341 | pub fn set_crcnext(&mut self, val: super::vals::Crcnext) { | 2956 | pub const fn pa_end_1(&self) -> u16 { |
| 2342 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize); | 2957 | let val = (self.0 >> 16usize) & 0x0fff; |
| 2958 | val as u16 | ||
| 2343 | } | 2959 | } |
| 2344 | #[doc = "Hardware CRC calculation enable"] | 2960 | #[doc = "Protected area end address for bank 1"] |
| 2345 | pub const fn crcen(&self) -> bool { | 2961 | pub fn set_pa_end_1(&mut self, val: u16) { |
| 2346 | let val = (self.0 >> 13usize) & 0x01; | 2962 | self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); |
| 2347 | val != 0 | ||
| 2348 | } | 2963 | } |
| 2349 | #[doc = "Hardware CRC calculation enable"] | 2964 | } |
| 2350 | pub fn set_crcen(&mut self, val: bool) { | 2965 | impl Default for Ur6 { |
| 2351 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); | 2966 | fn default() -> Ur6 { |
| 2967 | Ur6(0) | ||
| 2352 | } | 2968 | } |
| 2353 | #[doc = "Output enable in bidirectional mode"] | 2969 | } |
| 2354 | pub const fn bidioe(&self) -> super::vals::Bidioe { | 2970 | #[doc = "SYSCFG compensation cell code register"] |
| 2355 | let val = (self.0 >> 14usize) & 0x01; | 2971 | #[repr(transparent)] |
| 2356 | super::vals::Bidioe(val as u8) | 2972 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2973 | pub struct Cccr(pub u32); | ||
| 2974 | impl Cccr { | ||
| 2975 | #[doc = "NMOS compensation code"] | ||
| 2976 | pub const fn ncc(&self) -> u8 { | ||
| 2977 | let val = (self.0 >> 0usize) & 0x0f; | ||
| 2978 | val as u8 | ||
| 2357 | } | 2979 | } |
| 2358 | #[doc = "Output enable in bidirectional mode"] | 2980 | #[doc = "NMOS compensation code"] |
| 2359 | pub fn set_bidioe(&mut self, val: super::vals::Bidioe) { | 2981 | pub fn set_ncc(&mut self, val: u8) { |
| 2360 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); | 2982 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); |
| 2361 | } | 2983 | } |
| 2362 | #[doc = "Bidirectional data mode enable"] | 2984 | #[doc = "PMOS compensation code"] |
| 2363 | pub const fn bidimode(&self) -> super::vals::Bidimode { | 2985 | pub const fn pcc(&self) -> u8 { |
| 2364 | let val = (self.0 >> 15usize) & 0x01; | 2986 | let val = (self.0 >> 4usize) & 0x0f; |
| 2365 | super::vals::Bidimode(val as u8) | 2987 | val as u8 |
| 2366 | } | 2988 | } |
| 2367 | #[doc = "Bidirectional data mode enable"] | 2989 | #[doc = "PMOS compensation code"] |
| 2368 | pub fn set_bidimode(&mut self, val: super::vals::Bidimode) { | 2990 | pub fn set_pcc(&mut self, val: u8) { |
| 2369 | self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize); | 2991 | self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); |
| 2370 | } | 2992 | } |
| 2371 | } | 2993 | } |
| 2372 | impl Default for Cr1 { | 2994 | impl Default for Cccr { |
| 2373 | fn default() -> Cr1 { | 2995 | fn default() -> Cccr { |
| 2374 | Cr1(0) | 2996 | Cccr(0) |
| 2375 | } | 2997 | } |
| 2376 | } | 2998 | } |
| 2377 | #[doc = "CRC polynomial register"] | 2999 | #[doc = "SYSCFG user register 7"] |
| 2378 | #[repr(transparent)] | 3000 | #[repr(transparent)] |
| 2379 | #[derive(Copy, Clone, Eq, PartialEq)] | 3001 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2380 | pub struct Crcpr(pub u32); | 3002 | pub struct Ur7(pub u32); |
| 2381 | impl Crcpr { | 3003 | impl Ur7 { |
| 2382 | #[doc = "CRC polynomial register"] | 3004 | #[doc = "Secured area start address for bank 1"] |
| 2383 | pub const fn crcpoly(&self) -> u16 { | 3005 | pub const fn sa_beg_1(&self) -> u16 { |
| 2384 | let val = (self.0 >> 0usize) & 0xffff; | 3006 | let val = (self.0 >> 0usize) & 0x0fff; |
| 2385 | val as u16 | 3007 | val as u16 |
| 2386 | } | 3008 | } |
| 2387 | #[doc = "CRC polynomial register"] | 3009 | #[doc = "Secured area start address for bank 1"] |
| 2388 | pub fn set_crcpoly(&mut self, val: u16) { | 3010 | pub fn set_sa_beg_1(&mut self, val: u16) { |
| 2389 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | 3011 | self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); |
| 3012 | } | ||
| 3013 | #[doc = "Secured area end address for bank 1"] | ||
| 3014 | pub const fn sa_end_1(&self) -> u16 { | ||
| 3015 | let val = (self.0 >> 16usize) & 0x0fff; | ||
| 3016 | val as u16 | ||
| 3017 | } | ||
| 3018 | #[doc = "Secured area end address for bank 1"] | ||
| 3019 | pub fn set_sa_end_1(&mut self, val: u16) { | ||
| 3020 | self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); | ||
| 2390 | } | 3021 | } |
| 2391 | } | 3022 | } |
| 2392 | impl Default for Crcpr { | 3023 | impl Default for Ur7 { |
| 2393 | fn default() -> Crcpr { | 3024 | fn default() -> Ur7 { |
| 2394 | Crcpr(0) | 3025 | Ur7(0) |
| 2395 | } | 3026 | } |
| 2396 | } | 3027 | } |
| 2397 | #[doc = "RX CRC register"] | 3028 | #[doc = "SYSCFG user register 3"] |
| 2398 | #[repr(transparent)] | 3029 | #[repr(transparent)] |
| 2399 | #[derive(Copy, Clone, Eq, PartialEq)] | 3030 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2400 | pub struct Rxcrcr(pub u32); | 3031 | pub struct Ur3(pub u32); |
| 2401 | impl Rxcrcr { | 3032 | impl Ur3 { |
| 2402 | #[doc = "Rx CRC register"] | 3033 | #[doc = "Boot Address 1"] |
| 2403 | pub const fn rx_crc(&self) -> u16 { | 3034 | pub const fn boot_add1(&self) -> u16 { |
| 2404 | let val = (self.0 >> 0usize) & 0xffff; | 3035 | let val = (self.0 >> 16usize) & 0xffff; |
| 2405 | val as u16 | 3036 | val as u16 |
| 2406 | } | 3037 | } |
| 2407 | #[doc = "Rx CRC register"] | 3038 | #[doc = "Boot Address 1"] |
| 2408 | pub fn set_rx_crc(&mut self, val: u16) { | 3039 | pub fn set_boot_add1(&mut self, val: u16) { |
| 2409 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | 3040 | self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize); |
| 2410 | } | 3041 | } |
| 2411 | } | 3042 | } |
| 2412 | impl Default for Rxcrcr { | 3043 | impl Default for Ur3 { |
| 2413 | fn default() -> Rxcrcr { | 3044 | fn default() -> Ur3 { |
| 2414 | Rxcrcr(0) | 3045 | Ur3(0) |
| 2415 | } | 3046 | } |
| 2416 | } | 3047 | } |
| 2417 | #[doc = "data register"] | 3048 | #[doc = "SYSCFG user register 12"] |
| 2418 | #[repr(transparent)] | 3049 | #[repr(transparent)] |
| 2419 | #[derive(Copy, Clone, Eq, PartialEq)] | 3050 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2420 | pub struct Dr(pub u32); | 3051 | pub struct Ur12(pub u32); |
| 2421 | impl Dr { | 3052 | impl Ur12 { |
| 2422 | #[doc = "Data register"] | 3053 | #[doc = "Secure mode"] |
| 2423 | pub const fn dr(&self) -> u16 { | 3054 | pub const fn secure(&self) -> bool { |
| 2424 | let val = (self.0 >> 0usize) & 0xffff; | 3055 | let val = (self.0 >> 16usize) & 0x01; |
| 2425 | val as u16 | 3056 | val != 0 |
| 2426 | } | 3057 | } |
| 2427 | #[doc = "Data register"] | 3058 | #[doc = "Secure mode"] |
| 2428 | pub fn set_dr(&mut self, val: u16) { | 3059 | pub fn set_secure(&mut self, val: bool) { |
| 2429 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | 3060 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); |
| 2430 | } | 3061 | } |
| 2431 | } | 3062 | } |
| 2432 | impl Default for Dr { | 3063 | impl Default for Ur12 { |
| 2433 | fn default() -> Dr { | 3064 | fn default() -> Ur12 { |
| 2434 | Dr(0) | 3065 | Ur12(0) |
| 2435 | } | 3066 | } |
| 2436 | } | 3067 | } |
| 2437 | #[doc = "control register 2"] | 3068 | #[doc = "peripheral mode configuration register"] |
| 2438 | #[repr(transparent)] | 3069 | #[repr(transparent)] |
| 2439 | #[derive(Copy, Clone, Eq, PartialEq)] | 3070 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2440 | pub struct Cr2(pub u32); | 3071 | pub struct Pmcr(pub u32); |
| 2441 | impl Cr2 { | 3072 | impl Pmcr { |
| 2442 | #[doc = "Rx buffer DMA enable"] | 3073 | #[doc = "I2C1 Fm+"] |
| 2443 | pub const fn rxdmaen(&self) -> bool { | 3074 | pub const fn i2c1fmp(&self) -> bool { |
| 2444 | let val = (self.0 >> 0usize) & 0x01; | 3075 | let val = (self.0 >> 0usize) & 0x01; |
| 2445 | val != 0 | 3076 | val != 0 |
| 2446 | } | 3077 | } |
| 2447 | #[doc = "Rx buffer DMA enable"] | 3078 | #[doc = "I2C1 Fm+"] |
| 2448 | pub fn set_rxdmaen(&mut self, val: bool) { | 3079 | pub fn set_i2c1fmp(&mut self, val: bool) { |
| 2449 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 3080 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 2450 | } | 3081 | } |
| 2451 | #[doc = "Tx buffer DMA enable"] | 3082 | #[doc = "I2C2 Fm+"] |
| 2452 | pub const fn txdmaen(&self) -> bool { | 3083 | pub const fn i2c2fmp(&self) -> bool { |
| 2453 | let val = (self.0 >> 1usize) & 0x01; | 3084 | let val = (self.0 >> 1usize) & 0x01; |
| 2454 | val != 0 | 3085 | val != 0 |
| 2455 | } | 3086 | } |
| 2456 | #[doc = "Tx buffer DMA enable"] | 3087 | #[doc = "I2C2 Fm+"] |
| 2457 | pub fn set_txdmaen(&mut self, val: bool) { | 3088 | pub fn set_i2c2fmp(&mut self, val: bool) { |
| 2458 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 3089 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 2459 | } | 3090 | } |
| 2460 | #[doc = "SS output enable"] | 3091 | #[doc = "I2C3 Fm+"] |
| 2461 | pub const fn ssoe(&self) -> bool { | 3092 | pub const fn i2c3fmp(&self) -> bool { |
| 2462 | let val = (self.0 >> 2usize) & 0x01; | 3093 | let val = (self.0 >> 2usize) & 0x01; |
| 2463 | val != 0 | 3094 | val != 0 |
| 2464 | } | 3095 | } |
| 2465 | #[doc = "SS output enable"] | 3096 | #[doc = "I2C3 Fm+"] |
| 2466 | pub fn set_ssoe(&mut self, val: bool) { | 3097 | pub fn set_i2c3fmp(&mut self, val: bool) { |
| 2467 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | 3098 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); |
| 2468 | } | 3099 | } |
| 2469 | #[doc = "Frame format"] | 3100 | #[doc = "I2C4 Fm+"] |
| 2470 | pub const fn frf(&self) -> super::vals::Frf { | 3101 | pub const fn i2c4fmp(&self) -> bool { |
| 3102 | let val = (self.0 >> 3usize) & 0x01; | ||
| 3103 | val != 0 | ||
| 3104 | } | ||
| 3105 | #[doc = "I2C4 Fm+"] | ||
| 3106 | pub fn set_i2c4fmp(&mut self, val: bool) { | ||
| 3107 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | ||
| 3108 | } | ||
| 3109 | #[doc = "PB(6) Fm+"] | ||
| 3110 | pub const fn pb6fmp(&self) -> bool { | ||
| 2471 | let val = (self.0 >> 4usize) & 0x01; | 3111 | let val = (self.0 >> 4usize) & 0x01; |
| 2472 | super::vals::Frf(val as u8) | 3112 | val != 0 |
| 2473 | } | 3113 | } |
| 2474 | #[doc = "Frame format"] | 3114 | #[doc = "PB(6) Fm+"] |
| 2475 | pub fn set_frf(&mut self, val: super::vals::Frf) { | 3115 | pub fn set_pb6fmp(&mut self, val: bool) { |
| 2476 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize); | 3116 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); |
| 2477 | } | 3117 | } |
| 2478 | #[doc = "Error interrupt enable"] | 3118 | #[doc = "PB(7) Fast Mode Plus"] |
| 2479 | pub const fn errie(&self) -> bool { | 3119 | pub const fn pb7fmp(&self) -> bool { |
| 2480 | let val = (self.0 >> 5usize) & 0x01; | 3120 | let val = (self.0 >> 5usize) & 0x01; |
| 2481 | val != 0 | 3121 | val != 0 |
| 2482 | } | 3122 | } |
| 2483 | #[doc = "Error interrupt enable"] | 3123 | #[doc = "PB(7) Fast Mode Plus"] |
| 2484 | pub fn set_errie(&mut self, val: bool) { | 3124 | pub fn set_pb7fmp(&mut self, val: bool) { |
| 2485 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | 3125 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); |
| 2486 | } | 3126 | } |
| 2487 | #[doc = "RX buffer not empty interrupt enable"] | 3127 | #[doc = "PB(8) Fast Mode Plus"] |
| 2488 | pub const fn rxneie(&self) -> bool { | 3128 | pub const fn pb8fmp(&self) -> bool { |
| 2489 | let val = (self.0 >> 6usize) & 0x01; | 3129 | let val = (self.0 >> 6usize) & 0x01; |
| 2490 | val != 0 | 3130 | val != 0 |
| 2491 | } | 3131 | } |
| 2492 | #[doc = "RX buffer not empty interrupt enable"] | 3132 | #[doc = "PB(8) Fast Mode Plus"] |
| 2493 | pub fn set_rxneie(&mut self, val: bool) { | 3133 | pub fn set_pb8fmp(&mut self, val: bool) { |
| 2494 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 3134 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 2495 | } | 3135 | } |
| 2496 | #[doc = "Tx buffer empty interrupt enable"] | 3136 | #[doc = "PB(9) Fm+"] |
| 2497 | pub const fn txeie(&self) -> bool { | 3137 | pub const fn pb9fmp(&self) -> bool { |
| 2498 | let val = (self.0 >> 7usize) & 0x01; | 3138 | let val = (self.0 >> 7usize) & 0x01; |
| 2499 | val != 0 | 3139 | val != 0 |
| 2500 | } | 3140 | } |
| 2501 | #[doc = "Tx buffer empty interrupt enable"] | 3141 | #[doc = "PB(9) Fm+"] |
| 2502 | pub fn set_txeie(&mut self, val: bool) { | 3142 | pub fn set_pb9fmp(&mut self, val: bool) { |
| 2503 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | 3143 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); |
| 2504 | } | 3144 | } |
| 2505 | } | 3145 | #[doc = "Booster Enable"] |
| 2506 | impl Default for Cr2 { | 3146 | pub const fn booste(&self) -> bool { |
| 2507 | fn default() -> Cr2 { | 3147 | let val = (self.0 >> 8usize) & 0x01; |
| 2508 | Cr2(0) | 3148 | val != 0 |
| 2509 | } | ||
| 2510 | } | ||
| 2511 | } | ||
| 2512 | pub mod vals { | ||
| 2513 | use crate::generic::*; | ||
| 2514 | #[repr(transparent)] | ||
| 2515 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 2516 | pub struct Cpol(pub u8); | ||
| 2517 | impl Cpol { | ||
| 2518 | #[doc = "CK to 0 when idle"] | ||
| 2519 | pub const IDLELOW: Self = Self(0); | ||
| 2520 | #[doc = "CK to 1 when idle"] | ||
| 2521 | pub const IDLEHIGH: Self = Self(0x01); | ||
| 2522 | } | ||
| 2523 | #[repr(transparent)] | ||
| 2524 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 2525 | pub struct Mstr(pub u8); | ||
| 2526 | impl Mstr { | ||
| 2527 | #[doc = "Slave configuration"] | ||
| 2528 | pub const SLAVE: Self = Self(0); | ||
| 2529 | #[doc = "Master configuration"] | ||
| 2530 | pub const MASTER: Self = Self(0x01); | ||
| 2531 | } | ||
| 2532 | #[repr(transparent)] | ||
| 2533 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 2534 | pub struct Crcnext(pub u8); | ||
| 2535 | impl Crcnext { | ||
| 2536 | #[doc = "Next transmit value is from Tx buffer"] | ||
| 2537 | pub const TXBUFFER: Self = Self(0); | ||
| 2538 | #[doc = "Next transmit value is from Tx CRC register"] | ||
| 2539 | pub const CRC: Self = Self(0x01); | ||
| 2540 | } | ||
| 2541 | #[repr(transparent)] | ||
| 2542 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 2543 | pub struct Lsbfirst(pub u8); | ||
| 2544 | impl Lsbfirst { | ||
| 2545 | #[doc = "Data is transmitted/received with the MSB first"] | ||
| 2546 | pub const MSBFIRST: Self = Self(0); | ||
| 2547 | #[doc = "Data is transmitted/received with the LSB first"] | ||
| 2548 | pub const LSBFIRST: Self = Self(0x01); | ||
| 2549 | } | ||
| 2550 | #[repr(transparent)] | ||
| 2551 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 2552 | pub struct Br(pub u8); | ||
| 2553 | impl Br { | ||
| 2554 | #[doc = "f_PCLK / 2"] | ||
| 2555 | pub const DIV2: Self = Self(0); | ||
| 2556 | #[doc = "f_PCLK / 4"] | ||
| 2557 | pub const DIV4: Self = Self(0x01); | ||
| 2558 | #[doc = "f_PCLK / 8"] | ||
| 2559 | pub const DIV8: Self = Self(0x02); | ||
| 2560 | #[doc = "f_PCLK / 16"] | ||
| 2561 | pub const DIV16: Self = Self(0x03); | ||
| 2562 | #[doc = "f_PCLK / 32"] | ||
| 2563 | pub const DIV32: Self = Self(0x04); | ||
| 2564 | #[doc = "f_PCLK / 64"] | ||
| 2565 | pub const DIV64: Self = Self(0x05); | ||
| 2566 | #[doc = "f_PCLK / 128"] | ||
| 2567 | pub const DIV128: Self = Self(0x06); | ||
| 2568 | #[doc = "f_PCLK / 256"] | ||
| 2569 | pub const DIV256: Self = Self(0x07); | ||
| 2570 | } | ||
| 2571 | #[repr(transparent)] | ||
| 2572 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 2573 | pub struct Iscfg(pub u8); | ||
| 2574 | impl Iscfg { | ||
| 2575 | #[doc = "Slave - transmit"] | ||
| 2576 | pub const SLAVETX: Self = Self(0); | ||
| 2577 | #[doc = "Slave - receive"] | ||
| 2578 | pub const SLAVERX: Self = Self(0x01); | ||
| 2579 | #[doc = "Master - transmit"] | ||
| 2580 | pub const MASTERTX: Self = Self(0x02); | ||
| 2581 | #[doc = "Master - receive"] | ||
| 2582 | pub const MASTERRX: Self = Self(0x03); | ||
| 2583 | } | ||
| 2584 | #[repr(transparent)] | ||
| 2585 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 2586 | pub struct Cpha(pub u8); | ||
| 2587 | impl Cpha { | ||
| 2588 | #[doc = "The first clock transition is the first data capture edge"] | ||
| 2589 | pub const FIRSTEDGE: Self = Self(0); | ||
| 2590 | #[doc = "The second clock transition is the first data capture edge"] | ||
| 2591 | pub const SECONDEDGE: Self = Self(0x01); | ||
| 2592 | } | ||
| 2593 | #[repr(transparent)] | ||
| 2594 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 2595 | pub struct Frf(pub u8); | ||
| 2596 | impl Frf { | ||
| 2597 | #[doc = "SPI Motorola mode"] | ||
| 2598 | pub const MOTOROLA: Self = Self(0); | ||
| 2599 | #[doc = "SPI TI mode"] | ||
| 2600 | pub const TI: Self = Self(0x01); | ||
| 2601 | } | ||
| 2602 | #[repr(transparent)] | ||
| 2603 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 2604 | pub struct Rxonly(pub u8); | ||
| 2605 | impl Rxonly { | ||
| 2606 | #[doc = "Full duplex (Transmit and receive)"] | ||
| 2607 | pub const FULLDUPLEX: Self = Self(0); | ||
| 2608 | #[doc = "Output disabled (Receive-only mode)"] | ||
| 2609 | pub const OUTPUTDISABLED: Self = Self(0x01); | ||
| 2610 | } | ||
| 2611 | #[repr(transparent)] | ||
| 2612 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 2613 | pub struct Dff(pub u8); | ||
| 2614 | impl Dff { | ||
| 2615 | #[doc = "8-bit data frame format is selected for transmission/reception"] | ||
| 2616 | pub const EIGHTBIT: Self = Self(0); | ||
| 2617 | #[doc = "16-bit data frame format is selected for transmission/reception"] | ||
| 2618 | pub const SIXTEENBIT: Self = Self(0x01); | ||
| 2619 | } | ||
| 2620 | #[repr(transparent)] | ||
| 2621 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 2622 | pub struct Bidimode(pub u8); | ||
| 2623 | impl Bidimode { | ||
| 2624 | #[doc = "2-line unidirectional data mode selected"] | ||
| 2625 | pub const UNIDIRECTIONAL: Self = Self(0); | ||
| 2626 | #[doc = "1-line bidirectional data mode selected"] | ||
| 2627 | pub const BIDIRECTIONAL: Self = Self(0x01); | ||
| 2628 | } | ||
| 2629 | #[repr(transparent)] | ||
| 2630 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 2631 | pub struct Frer(pub u8); | ||
| 2632 | impl Frer { | ||
| 2633 | #[doc = "No frame format error"] | ||
| 2634 | pub const NOERROR: Self = Self(0); | ||
| 2635 | #[doc = "A frame format error occurred"] | ||
| 2636 | pub const ERROR: Self = Self(0x01); | ||
| 2637 | } | ||
| 2638 | #[repr(transparent)] | ||
| 2639 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 2640 | pub struct Bidioe(pub u8); | ||
| 2641 | impl Bidioe { | ||
| 2642 | #[doc = "Output disabled (receive-only mode)"] | ||
| 2643 | pub const OUTPUTDISABLED: Self = Self(0); | ||
| 2644 | #[doc = "Output enabled (transmit-only mode)"] | ||
| 2645 | pub const OUTPUTENABLED: Self = Self(0x01); | ||
| 2646 | } | ||
| 2647 | } | ||
| 2648 | } | ||
| 2649 | pub mod generic { | ||
| 2650 | use core::marker::PhantomData; | ||
| 2651 | #[derive(Copy, Clone)] | ||
| 2652 | pub struct RW; | ||
| 2653 | #[derive(Copy, Clone)] | ||
| 2654 | pub struct R; | ||
| 2655 | #[derive(Copy, Clone)] | ||
| 2656 | pub struct W; | ||
| 2657 | mod sealed { | ||
| 2658 | use super::*; | ||
| 2659 | pub trait Access {} | ||
| 2660 | impl Access for R {} | ||
| 2661 | impl Access for W {} | ||
| 2662 | impl Access for RW {} | ||
| 2663 | } | ||
| 2664 | pub trait Access: sealed::Access + Copy {} | ||
| 2665 | impl Access for R {} | ||
| 2666 | impl Access for W {} | ||
| 2667 | impl Access for RW {} | ||
| 2668 | pub trait Read: Access {} | ||
| 2669 | impl Read for RW {} | ||
| 2670 | impl Read for R {} | ||
| 2671 | pub trait Write: Access {} | ||
| 2672 | impl Write for RW {} | ||
| 2673 | impl Write for W {} | ||
| 2674 | #[derive(Copy, Clone)] | ||
| 2675 | pub struct Reg<T: Copy, A: Access> { | ||
| 2676 | ptr: *mut u8, | ||
| 2677 | phantom: PhantomData<*mut (T, A)>, | ||
| 2678 | } | ||
| 2679 | unsafe impl<T: Copy, A: Access> Send for Reg<T, A> {} | ||
| 2680 | unsafe impl<T: Copy, A: Access> Sync for Reg<T, A> {} | ||
| 2681 | impl<T: Copy, A: Access> Reg<T, A> { | ||
| 2682 | pub fn from_ptr(ptr: *mut u8) -> Self { | ||
| 2683 | Self { | ||
| 2684 | ptr, | ||
| 2685 | phantom: PhantomData, | ||
| 2686 | } | ||
| 2687 | } | ||
| 2688 | pub fn ptr(&self) -> *mut T { | ||
| 2689 | self.ptr as _ | ||
| 2690 | } | ||
| 2691 | } | ||
| 2692 | impl<T: Copy, A: Read> Reg<T, A> { | ||
| 2693 | pub unsafe fn read(&self) -> T { | ||
| 2694 | (self.ptr as *mut T).read_volatile() | ||
| 2695 | } | ||
| 2696 | } | ||
| 2697 | impl<T: Copy, A: Write> Reg<T, A> { | ||
| 2698 | pub unsafe fn write_value(&self, val: T) { | ||
| 2699 | (self.ptr as *mut T).write_volatile(val) | ||
| 2700 | } | ||
| 2701 | } | ||
| 2702 | impl<T: Default + Copy, A: Write> Reg<T, A> { | ||
| 2703 | pub unsafe fn write<R>(&self, f: impl FnOnce(&mut T) -> R) -> R { | ||
| 2704 | let mut val = Default::default(); | ||
| 2705 | let res = f(&mut val); | ||
| 2706 | self.write_value(val); | ||
| 2707 | res | ||
| 2708 | } | ||
| 2709 | } | ||
| 2710 | impl<T: Copy, A: Read + Write> Reg<T, A> { | ||
| 2711 | pub unsafe fn modify<R>(&self, f: impl FnOnce(&mut T) -> R) -> R { | ||
| 2712 | let mut val = self.read(); | ||
| 2713 | let res = f(&mut val); | ||
| 2714 | self.write_value(val); | ||
| 2715 | res | ||
| 2716 | } | ||
| 2717 | } | ||
| 2718 | } | ||
| 2719 | pub mod gpio_v2 { | ||
| 2720 | use crate::generic::*; | ||
| 2721 | #[doc = "General-purpose I/Os"] | ||
| 2722 | #[derive(Copy, Clone)] | ||
| 2723 | pub struct Gpio(pub *mut u8); | ||
| 2724 | unsafe impl Send for Gpio {} | ||
| 2725 | unsafe impl Sync for Gpio {} | ||
| 2726 | impl Gpio { | ||
| 2727 | #[doc = "GPIO port mode register"] | ||
| 2728 | pub fn moder(self) -> Reg<regs::Moder, RW> { | ||
| 2729 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 2730 | } | ||
| 2731 | #[doc = "GPIO port output type register"] | ||
| 2732 | pub fn otyper(self) -> Reg<regs::Otyper, RW> { | ||
| 2733 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 2734 | } | ||
| 2735 | #[doc = "GPIO port output speed register"] | ||
| 2736 | pub fn ospeedr(self) -> Reg<regs::Ospeedr, RW> { | ||
| 2737 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 2738 | } | ||
| 2739 | #[doc = "GPIO port pull-up/pull-down register"] | ||
| 2740 | pub fn pupdr(self) -> Reg<regs::Pupdr, RW> { | ||
| 2741 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 2742 | } | ||
| 2743 | #[doc = "GPIO port input data register"] | ||
| 2744 | pub fn idr(self) -> Reg<regs::Idr, R> { | ||
| 2745 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 2746 | } | ||
| 2747 | #[doc = "GPIO port output data register"] | ||
| 2748 | pub fn odr(self) -> Reg<regs::Odr, RW> { | ||
| 2749 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | ||
| 2750 | } | ||
| 2751 | #[doc = "GPIO port bit set/reset register"] | ||
| 2752 | pub fn bsrr(self) -> Reg<regs::Bsrr, W> { | ||
| 2753 | unsafe { Reg::from_ptr(self.0.add(24usize)) } | ||
| 2754 | } | ||
| 2755 | #[doc = "GPIO port configuration lock register"] | ||
| 2756 | pub fn lckr(self) -> Reg<regs::Lckr, RW> { | ||
| 2757 | unsafe { Reg::from_ptr(self.0.add(28usize)) } | ||
| 2758 | } | ||
| 2759 | #[doc = "GPIO alternate function register (low, high)"] | ||
| 2760 | pub fn afr(self, n: usize) -> Reg<regs::Afr, RW> { | ||
| 2761 | assert!(n < 2usize); | ||
| 2762 | unsafe { Reg::from_ptr(self.0.add(32usize + n * 4usize)) } | ||
| 2763 | } | ||
| 2764 | } | ||
| 2765 | pub mod regs { | ||
| 2766 | use crate::generic::*; | ||
| 2767 | #[doc = "GPIO alternate function register"] | ||
| 2768 | #[repr(transparent)] | ||
| 2769 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2770 | pub struct Afr(pub u32); | ||
| 2771 | impl Afr { | ||
| 2772 | #[doc = "Alternate function selection for port x bit y (y = 0..15)"] | ||
| 2773 | pub fn afr(&self, n: usize) -> super::vals::Afr { | ||
| 2774 | assert!(n < 8usize); | ||
| 2775 | let offs = 0usize + n * 4usize; | ||
| 2776 | let val = (self.0 >> offs) & 0x0f; | ||
| 2777 | super::vals::Afr(val as u8) | ||
| 2778 | } | ||
| 2779 | #[doc = "Alternate function selection for port x bit y (y = 0..15)"] | ||
| 2780 | pub fn set_afr(&mut self, n: usize, val: super::vals::Afr) { | ||
| 2781 | assert!(n < 8usize); | ||
| 2782 | let offs = 0usize + n * 4usize; | ||
| 2783 | self.0 = (self.0 & !(0x0f << offs)) | (((val.0 as u32) & 0x0f) << offs); | ||
| 2784 | } | ||
| 2785 | } | ||
| 2786 | impl Default for Afr { | ||
| 2787 | fn default() -> Afr { | ||
| 2788 | Afr(0) | ||
| 2789 | } | ||
| 2790 | } | ||
| 2791 | #[doc = "GPIO port input data register"] | ||
| 2792 | #[repr(transparent)] | ||
| 2793 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2794 | pub struct Idr(pub u32); | ||
| 2795 | impl Idr { | ||
| 2796 | #[doc = "Port input data (y = 0..15)"] | ||
| 2797 | pub fn idr(&self, n: usize) -> super::vals::Idr { | ||
| 2798 | assert!(n < 16usize); | ||
| 2799 | let offs = 0usize + n * 1usize; | ||
| 2800 | let val = (self.0 >> offs) & 0x01; | ||
| 2801 | super::vals::Idr(val as u8) | ||
| 2802 | } | ||
| 2803 | #[doc = "Port input data (y = 0..15)"] | ||
| 2804 | pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) { | ||
| 2805 | assert!(n < 16usize); | ||
| 2806 | let offs = 0usize + n * 1usize; | ||
| 2807 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 2808 | } | ||
| 2809 | } | ||
| 2810 | impl Default for Idr { | ||
| 2811 | fn default() -> Idr { | ||
| 2812 | Idr(0) | ||
| 2813 | } | ||
| 2814 | } | ||
| 2815 | #[doc = "GPIO port pull-up/pull-down register"] | ||
| 2816 | #[repr(transparent)] | ||
| 2817 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2818 | pub struct Pupdr(pub u32); | ||
| 2819 | impl Pupdr { | ||
| 2820 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 2821 | pub fn pupdr(&self, n: usize) -> super::vals::Pupdr { | ||
| 2822 | assert!(n < 16usize); | ||
| 2823 | let offs = 0usize + n * 2usize; | ||
| 2824 | let val = (self.0 >> offs) & 0x03; | ||
| 2825 | super::vals::Pupdr(val as u8) | ||
| 2826 | } | 3149 | } |
| 2827 | #[doc = "Port x configuration bits (y = 0..15)"] | 3150 | #[doc = "Booster Enable"] |
| 2828 | pub fn set_pupdr(&mut self, n: usize, val: super::vals::Pupdr) { | 3151 | pub fn set_booste(&mut self, val: bool) { |
| 2829 | assert!(n < 16usize); | 3152 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 2830 | let offs = 0usize + n * 2usize; | ||
| 2831 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 2832 | } | 3153 | } |
| 2833 | } | 3154 | #[doc = "Analog switch supply voltage selection"] |
| 2834 | impl Default for Pupdr { | 3155 | pub const fn boostvddsel(&self) -> bool { |
| 2835 | fn default() -> Pupdr { | 3156 | let val = (self.0 >> 9usize) & 0x01; |
| 2836 | Pupdr(0) | 3157 | val != 0 |
| 2837 | } | 3158 | } |
| 2838 | } | 3159 | #[doc = "Analog switch supply voltage selection"] |
| 2839 | #[doc = "GPIO port mode register"] | 3160 | pub fn set_boostvddsel(&mut self, val: bool) { |
| 2840 | #[repr(transparent)] | 3161 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); |
| 2841 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2842 | pub struct Moder(pub u32); | ||
| 2843 | impl Moder { | ||
| 2844 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 2845 | pub fn moder(&self, n: usize) -> super::vals::Moder { | ||
| 2846 | assert!(n < 16usize); | ||
| 2847 | let offs = 0usize + n * 2usize; | ||
| 2848 | let val = (self.0 >> offs) & 0x03; | ||
| 2849 | super::vals::Moder(val as u8) | ||
| 2850 | } | 3162 | } |
| 2851 | #[doc = "Port x configuration bits (y = 0..15)"] | 3163 | #[doc = "Ethernet PHY Interface Selection"] |
| 2852 | pub fn set_moder(&mut self, n: usize, val: super::vals::Moder) { | 3164 | pub const fn epis(&self) -> u8 { |
| 2853 | assert!(n < 16usize); | 3165 | let val = (self.0 >> 21usize) & 0x07; |
| 2854 | let offs = 0usize + n * 2usize; | 3166 | val as u8 |
| 2855 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 2856 | } | 3167 | } |
| 2857 | } | 3168 | #[doc = "Ethernet PHY Interface Selection"] |
| 2858 | impl Default for Moder { | 3169 | pub fn set_epis(&mut self, val: u8) { |
| 2859 | fn default() -> Moder { | 3170 | self.0 = (self.0 & !(0x07 << 21usize)) | (((val as u32) & 0x07) << 21usize); |
| 2860 | Moder(0) | ||
| 2861 | } | 3171 | } |
| 2862 | } | 3172 | #[doc = "PA0 Switch Open"] |
| 2863 | #[doc = "GPIO port output type register"] | 3173 | pub const fn pa0so(&self) -> bool { |
| 2864 | #[repr(transparent)] | 3174 | let val = (self.0 >> 24usize) & 0x01; |
| 2865 | #[derive(Copy, Clone, Eq, PartialEq)] | 3175 | val != 0 |
| 2866 | pub struct Otyper(pub u32); | ||
| 2867 | impl Otyper { | ||
| 2868 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 2869 | pub fn ot(&self, n: usize) -> super::vals::Ot { | ||
| 2870 | assert!(n < 16usize); | ||
| 2871 | let offs = 0usize + n * 1usize; | ||
| 2872 | let val = (self.0 >> offs) & 0x01; | ||
| 2873 | super::vals::Ot(val as u8) | ||
| 2874 | } | 3176 | } |
| 2875 | #[doc = "Port x configuration bits (y = 0..15)"] | 3177 | #[doc = "PA0 Switch Open"] |
| 2876 | pub fn set_ot(&mut self, n: usize, val: super::vals::Ot) { | 3178 | pub fn set_pa0so(&mut self, val: bool) { |
| 2877 | assert!(n < 16usize); | 3179 | self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); |
| 2878 | let offs = 0usize + n * 1usize; | ||
| 2879 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 2880 | } | 3180 | } |
| 2881 | } | 3181 | #[doc = "PA1 Switch Open"] |
| 2882 | impl Default for Otyper { | 3182 | pub const fn pa1so(&self) -> bool { |
| 2883 | fn default() -> Otyper { | 3183 | let val = (self.0 >> 25usize) & 0x01; |
| 2884 | Otyper(0) | 3184 | val != 0 |
| 2885 | } | 3185 | } |
| 2886 | } | 3186 | #[doc = "PA1 Switch Open"] |
| 2887 | #[doc = "GPIO port output data register"] | 3187 | pub fn set_pa1so(&mut self, val: bool) { |
| 2888 | #[repr(transparent)] | 3188 | self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); |
| 2889 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2890 | pub struct Odr(pub u32); | ||
| 2891 | impl Odr { | ||
| 2892 | #[doc = "Port output data (y = 0..15)"] | ||
| 2893 | pub fn odr(&self, n: usize) -> super::vals::Odr { | ||
| 2894 | assert!(n < 16usize); | ||
| 2895 | let offs = 0usize + n * 1usize; | ||
| 2896 | let val = (self.0 >> offs) & 0x01; | ||
| 2897 | super::vals::Odr(val as u8) | ||
| 2898 | } | 3189 | } |
| 2899 | #[doc = "Port output data (y = 0..15)"] | 3190 | #[doc = "PC2 Switch Open"] |
| 2900 | pub fn set_odr(&mut self, n: usize, val: super::vals::Odr) { | 3191 | pub const fn pc2so(&self) -> bool { |
| 2901 | assert!(n < 16usize); | 3192 | let val = (self.0 >> 26usize) & 0x01; |
| 2902 | let offs = 0usize + n * 1usize; | 3193 | val != 0 |
| 2903 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 2904 | } | 3194 | } |
| 2905 | } | 3195 | #[doc = "PC2 Switch Open"] |
| 2906 | impl Default for Odr { | 3196 | pub fn set_pc2so(&mut self, val: bool) { |
| 2907 | fn default() -> Odr { | 3197 | self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); |
| 2908 | Odr(0) | ||
| 2909 | } | 3198 | } |
| 2910 | } | 3199 | #[doc = "PC3 Switch Open"] |
| 2911 | #[doc = "GPIO port output speed register"] | 3200 | pub const fn pc3so(&self) -> bool { |
| 2912 | #[repr(transparent)] | 3201 | let val = (self.0 >> 27usize) & 0x01; |
| 2913 | #[derive(Copy, Clone, Eq, PartialEq)] | 3202 | val != 0 |
| 2914 | pub struct Ospeedr(pub u32); | ||
| 2915 | impl Ospeedr { | ||
| 2916 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 2917 | pub fn ospeedr(&self, n: usize) -> super::vals::Ospeedr { | ||
| 2918 | assert!(n < 16usize); | ||
| 2919 | let offs = 0usize + n * 2usize; | ||
| 2920 | let val = (self.0 >> offs) & 0x03; | ||
| 2921 | super::vals::Ospeedr(val as u8) | ||
| 2922 | } | 3203 | } |
| 2923 | #[doc = "Port x configuration bits (y = 0..15)"] | 3204 | #[doc = "PC3 Switch Open"] |
| 2924 | pub fn set_ospeedr(&mut self, n: usize, val: super::vals::Ospeedr) { | 3205 | pub fn set_pc3so(&mut self, val: bool) { |
| 2925 | assert!(n < 16usize); | 3206 | self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); |
| 2926 | let offs = 0usize + n * 2usize; | ||
| 2927 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 2928 | } | 3207 | } |
| 2929 | } | 3208 | } |
| 2930 | impl Default for Ospeedr { | 3209 | impl Default for Pmcr { |
| 2931 | fn default() -> Ospeedr { | 3210 | fn default() -> Pmcr { |
| 2932 | Ospeedr(0) | 3211 | Pmcr(0) |
| 2933 | } | 3212 | } |
| 2934 | } | 3213 | } |
| 2935 | #[doc = "GPIO port configuration lock register"] | 3214 | #[doc = "SYSCFG user register 8"] |
| 2936 | #[repr(transparent)] | 3215 | #[repr(transparent)] |
| 2937 | #[derive(Copy, Clone, Eq, PartialEq)] | 3216 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2938 | pub struct Lckr(pub u32); | 3217 | pub struct Ur8(pub u32); |
| 2939 | impl Lckr { | 3218 | impl Ur8 { |
| 2940 | #[doc = "Port x lock bit y (y= 0..15)"] | 3219 | #[doc = "Mass erase protected area disabled for bank 2"] |
| 2941 | pub fn lck(&self, n: usize) -> super::vals::Lck { | 3220 | pub const fn mepad_2(&self) -> bool { |
| 2942 | assert!(n < 16usize); | 3221 | let val = (self.0 >> 0usize) & 0x01; |
| 2943 | let offs = 0usize + n * 1usize; | 3222 | val != 0 |
| 2944 | let val = (self.0 >> offs) & 0x01; | ||
| 2945 | super::vals::Lck(val as u8) | ||
| 2946 | } | 3223 | } |
| 2947 | #[doc = "Port x lock bit y (y= 0..15)"] | 3224 | #[doc = "Mass erase protected area disabled for bank 2"] |
| 2948 | pub fn set_lck(&mut self, n: usize, val: super::vals::Lck) { | 3225 | pub fn set_mepad_2(&mut self, val: bool) { |
| 2949 | assert!(n < 16usize); | 3226 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 2950 | let offs = 0usize + n * 1usize; | ||
| 2951 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 2952 | } | 3227 | } |
| 2953 | #[doc = "Port x lock bit y (y= 0..15)"] | 3228 | #[doc = "Mass erase secured area disabled for bank 2"] |
| 2954 | pub const fn lckk(&self) -> super::vals::Lckk { | 3229 | pub const fn mesad_2(&self) -> bool { |
| 2955 | let val = (self.0 >> 16usize) & 0x01; | 3230 | let val = (self.0 >> 16usize) & 0x01; |
| 2956 | super::vals::Lckk(val as u8) | 3231 | val != 0 |
| 2957 | } | 3232 | } |
| 2958 | #[doc = "Port x lock bit y (y= 0..15)"] | 3233 | #[doc = "Mass erase secured area disabled for bank 2"] |
| 2959 | pub fn set_lckk(&mut self, val: super::vals::Lckk) { | 3234 | pub fn set_mesad_2(&mut self, val: bool) { |
| 2960 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val.0 as u32) & 0x01) << 16usize); | 3235 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); |
| 2961 | } | 3236 | } |
| 2962 | } | 3237 | } |
| 2963 | impl Default for Lckr { | 3238 | impl Default for Ur8 { |
| 2964 | fn default() -> Lckr { | 3239 | fn default() -> Ur8 { |
| 2965 | Lckr(0) | 3240 | Ur8(0) |
| 2966 | } | 3241 | } |
| 2967 | } | 3242 | } |
| 2968 | #[doc = "GPIO port bit set/reset register"] | 3243 | #[doc = "SYSCFG power control register"] |
| 2969 | #[repr(transparent)] | 3244 | #[repr(transparent)] |
| 2970 | #[derive(Copy, Clone, Eq, PartialEq)] | 3245 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2971 | pub struct Bsrr(pub u32); | 3246 | pub struct Pwrcr(pub u32); |
| 2972 | impl Bsrr { | 3247 | impl Pwrcr { |
| 2973 | #[doc = "Port x set bit y (y= 0..15)"] | 3248 | #[doc = "Overdrive enable"] |
| 2974 | pub fn bs(&self, n: usize) -> bool { | 3249 | pub const fn oden(&self) -> u8 { |
| 2975 | assert!(n < 16usize); | 3250 | let val = (self.0 >> 0usize) & 0x0f; |
| 2976 | let offs = 0usize + n * 1usize; | 3251 | val as u8 |
| 2977 | let val = (self.0 >> offs) & 0x01; | ||
| 2978 | val != 0 | ||
| 2979 | } | ||
| 2980 | #[doc = "Port x set bit y (y= 0..15)"] | ||
| 2981 | pub fn set_bs(&mut self, n: usize, val: bool) { | ||
| 2982 | assert!(n < 16usize); | ||
| 2983 | let offs = 0usize + n * 1usize; | ||
| 2984 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 2985 | } | ||
| 2986 | #[doc = "Port x set bit y (y= 0..15)"] | ||
| 2987 | pub fn br(&self, n: usize) -> bool { | ||
| 2988 | assert!(n < 16usize); | ||
| 2989 | let offs = 16usize + n * 1usize; | ||
| 2990 | let val = (self.0 >> offs) & 0x01; | ||
| 2991 | val != 0 | ||
| 2992 | } | 3252 | } |
| 2993 | #[doc = "Port x set bit y (y= 0..15)"] | 3253 | #[doc = "Overdrive enable"] |
| 2994 | pub fn set_br(&mut self, n: usize, val: bool) { | 3254 | pub fn set_oden(&mut self, val: u8) { |
| 2995 | assert!(n < 16usize); | 3255 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); |
| 2996 | let offs = 16usize + n * 1usize; | ||
| 2997 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 2998 | } | 3256 | } |
| 2999 | } | 3257 | } |
| 3000 | impl Default for Bsrr { | 3258 | impl Default for Pwrcr { |
| 3001 | fn default() -> Bsrr { | 3259 | fn default() -> Pwrcr { |
| 3002 | Bsrr(0) | 3260 | Pwrcr(0) |
| 3003 | } | 3261 | } |
| 3004 | } | 3262 | } |
| 3005 | } | 3263 | } |
| 3006 | pub mod vals { | ||
| 3007 | use crate::generic::*; | ||
| 3008 | #[repr(transparent)] | ||
| 3009 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3010 | pub struct Bsw(pub u8); | ||
| 3011 | impl Bsw { | ||
| 3012 | #[doc = "Sets the corresponding ODRx bit"] | ||
| 3013 | pub const SET: Self = Self(0x01); | ||
| 3014 | } | ||
| 3015 | #[repr(transparent)] | ||
| 3016 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3017 | pub struct Ot(pub u8); | ||
| 3018 | impl Ot { | ||
| 3019 | #[doc = "Output push-pull (reset state)"] | ||
| 3020 | pub const PUSHPULL: Self = Self(0); | ||
| 3021 | #[doc = "Output open-drain"] | ||
| 3022 | pub const OPENDRAIN: Self = Self(0x01); | ||
| 3023 | } | ||
| 3024 | #[repr(transparent)] | ||
| 3025 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3026 | pub struct Pupdr(pub u8); | ||
| 3027 | impl Pupdr { | ||
| 3028 | #[doc = "No pull-up, pull-down"] | ||
| 3029 | pub const FLOATING: Self = Self(0); | ||
| 3030 | #[doc = "Pull-up"] | ||
| 3031 | pub const PULLUP: Self = Self(0x01); | ||
| 3032 | #[doc = "Pull-down"] | ||
| 3033 | pub const PULLDOWN: Self = Self(0x02); | ||
| 3034 | } | ||
| 3035 | #[repr(transparent)] | ||
| 3036 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3037 | pub struct Moder(pub u8); | ||
| 3038 | impl Moder { | ||
| 3039 | #[doc = "Input mode (reset state)"] | ||
| 3040 | pub const INPUT: Self = Self(0); | ||
| 3041 | #[doc = "General purpose output mode"] | ||
| 3042 | pub const OUTPUT: Self = Self(0x01); | ||
| 3043 | #[doc = "Alternate function mode"] | ||
| 3044 | pub const ALTERNATE: Self = Self(0x02); | ||
| 3045 | #[doc = "Analog mode"] | ||
| 3046 | pub const ANALOG: Self = Self(0x03); | ||
| 3047 | } | ||
| 3048 | #[repr(transparent)] | ||
| 3049 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3050 | pub struct Idr(pub u8); | ||
| 3051 | impl Idr { | ||
| 3052 | #[doc = "Input is logic low"] | ||
| 3053 | pub const LOW: Self = Self(0); | ||
| 3054 | #[doc = "Input is logic high"] | ||
| 3055 | pub const HIGH: Self = Self(0x01); | ||
| 3056 | } | ||
| 3057 | #[repr(transparent)] | ||
| 3058 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3059 | pub struct Afr(pub u8); | ||
| 3060 | impl Afr { | ||
| 3061 | #[doc = "AF0"] | ||
| 3062 | pub const AF0: Self = Self(0); | ||
| 3063 | #[doc = "AF1"] | ||
| 3064 | pub const AF1: Self = Self(0x01); | ||
| 3065 | #[doc = "AF2"] | ||
| 3066 | pub const AF2: Self = Self(0x02); | ||
| 3067 | #[doc = "AF3"] | ||
| 3068 | pub const AF3: Self = Self(0x03); | ||
| 3069 | #[doc = "AF4"] | ||
| 3070 | pub const AF4: Self = Self(0x04); | ||
| 3071 | #[doc = "AF5"] | ||
| 3072 | pub const AF5: Self = Self(0x05); | ||
| 3073 | #[doc = "AF6"] | ||
| 3074 | pub const AF6: Self = Self(0x06); | ||
| 3075 | #[doc = "AF7"] | ||
| 3076 | pub const AF7: Self = Self(0x07); | ||
| 3077 | #[doc = "AF8"] | ||
| 3078 | pub const AF8: Self = Self(0x08); | ||
| 3079 | #[doc = "AF9"] | ||
| 3080 | pub const AF9: Self = Self(0x09); | ||
| 3081 | #[doc = "AF10"] | ||
| 3082 | pub const AF10: Self = Self(0x0a); | ||
| 3083 | #[doc = "AF11"] | ||
| 3084 | pub const AF11: Self = Self(0x0b); | ||
| 3085 | #[doc = "AF12"] | ||
| 3086 | pub const AF12: Self = Self(0x0c); | ||
| 3087 | #[doc = "AF13"] | ||
| 3088 | pub const AF13: Self = Self(0x0d); | ||
| 3089 | #[doc = "AF14"] | ||
| 3090 | pub const AF14: Self = Self(0x0e); | ||
| 3091 | #[doc = "AF15"] | ||
| 3092 | pub const AF15: Self = Self(0x0f); | ||
| 3093 | } | ||
| 3094 | #[repr(transparent)] | ||
| 3095 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3096 | pub struct Brw(pub u8); | ||
| 3097 | impl Brw { | ||
| 3098 | #[doc = "Resets the corresponding ODRx bit"] | ||
| 3099 | pub const RESET: Self = Self(0x01); | ||
| 3100 | } | ||
| 3101 | #[repr(transparent)] | ||
| 3102 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3103 | pub struct Odr(pub u8); | ||
| 3104 | impl Odr { | ||
| 3105 | #[doc = "Set output to logic low"] | ||
| 3106 | pub const LOW: Self = Self(0); | ||
| 3107 | #[doc = "Set output to logic high"] | ||
| 3108 | pub const HIGH: Self = Self(0x01); | ||
| 3109 | } | ||
| 3110 | #[repr(transparent)] | ||
| 3111 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3112 | pub struct Ospeedr(pub u8); | ||
| 3113 | impl Ospeedr { | ||
| 3114 | #[doc = "Low speed"] | ||
| 3115 | pub const LOWSPEED: Self = Self(0); | ||
| 3116 | #[doc = "Medium speed"] | ||
| 3117 | pub const MEDIUMSPEED: Self = Self(0x01); | ||
| 3118 | #[doc = "High speed"] | ||
| 3119 | pub const HIGHSPEED: Self = Self(0x02); | ||
| 3120 | #[doc = "Very high speed"] | ||
| 3121 | pub const VERYHIGHSPEED: Self = Self(0x03); | ||
| 3122 | } | ||
| 3123 | #[repr(transparent)] | ||
| 3124 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3125 | pub struct Lckk(pub u8); | ||
| 3126 | impl Lckk { | ||
| 3127 | #[doc = "Port configuration lock key not active"] | ||
| 3128 | pub const NOTACTIVE: Self = Self(0); | ||
| 3129 | #[doc = "Port configuration lock key active"] | ||
| 3130 | pub const ACTIVE: Self = Self(0x01); | ||
| 3131 | } | ||
| 3132 | #[repr(transparent)] | ||
| 3133 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3134 | pub struct Lck(pub u8); | ||
| 3135 | impl Lck { | ||
| 3136 | #[doc = "Port configuration not locked"] | ||
| 3137 | pub const UNLOCKED: Self = Self(0); | ||
| 3138 | #[doc = "Port configuration locked"] | ||
| 3139 | pub const LOCKED: Self = Self(0x01); | ||
| 3140 | } | ||
| 3141 | } | ||
| 3142 | } | 3264 | } |
| 3143 | pub mod dma_v1 { | 3265 | pub mod dma_v2 { |
| 3144 | use crate::generic::*; | 3266 | use crate::generic::*; |
| 3145 | #[doc = "DMA controller"] | 3267 | #[doc = "DMA controller"] |
| 3146 | #[derive(Copy, Clone)] | 3268 | #[derive(Copy, Clone)] |
| @@ -3148,366 +3270,230 @@ pub mod dma_v1 { | |||
| 3148 | unsafe impl Send for Dma {} | 3270 | unsafe impl Send for Dma {} |
| 3149 | unsafe impl Sync for Dma {} | 3271 | unsafe impl Sync for Dma {} |
| 3150 | impl Dma { | 3272 | impl Dma { |
| 3151 | #[doc = "DMA interrupt status register (DMA_ISR)"] | 3273 | #[doc = "low interrupt status register"] |
| 3152 | pub fn isr(self) -> Reg<regs::Isr, R> { | 3274 | pub fn isr(self, n: usize) -> Reg<regs::Ixr, R> { |
| 3153 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | 3275 | assert!(n < 2usize); |
| 3276 | unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) } | ||
| 3154 | } | 3277 | } |
| 3155 | #[doc = "DMA interrupt flag clear register (DMA_IFCR)"] | 3278 | #[doc = "low interrupt flag clear register"] |
| 3156 | pub fn ifcr(self) -> Reg<regs::Ifcr, W> { | 3279 | pub fn ifcr(self, n: usize) -> Reg<regs::Ixr, W> { |
| 3157 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | 3280 | assert!(n < 2usize); |
| 3281 | unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) } | ||
| 3158 | } | 3282 | } |
| 3159 | #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"] | 3283 | #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"] |
| 3160 | pub fn ch(self, n: usize) -> Ch { | 3284 | pub fn st(self, n: usize) -> St { |
| 3161 | assert!(n < 7usize); | 3285 | assert!(n < 8usize); |
| 3162 | unsafe { Ch(self.0.add(8usize + n * 20usize)) } | 3286 | unsafe { St(self.0.add(16usize + n * 24usize)) } |
| 3163 | } | 3287 | } |
| 3164 | } | 3288 | } |
| 3165 | #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"] | 3289 | #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"] |
| 3166 | #[derive(Copy, Clone)] | 3290 | #[derive(Copy, Clone)] |
| 3167 | pub struct Ch(pub *mut u8); | 3291 | pub struct St(pub *mut u8); |
| 3168 | unsafe impl Send for Ch {} | 3292 | unsafe impl Send for St {} |
| 3169 | unsafe impl Sync for Ch {} | 3293 | unsafe impl Sync for St {} |
| 3170 | impl Ch { | 3294 | impl St { |
| 3171 | #[doc = "DMA channel configuration register (DMA_CCR)"] | 3295 | #[doc = "stream x configuration register"] |
| 3172 | pub fn cr(self) -> Reg<regs::Cr, RW> { | 3296 | pub fn cr(self) -> Reg<regs::Cr, RW> { |
| 3173 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | 3297 | unsafe { Reg::from_ptr(self.0.add(0usize)) } |
| 3174 | } | 3298 | } |
| 3175 | #[doc = "DMA channel 1 number of data register"] | 3299 | #[doc = "stream x number of data register"] |
| 3176 | pub fn ndtr(self) -> Reg<regs::Ndtr, RW> { | 3300 | pub fn ndtr(self) -> Reg<regs::Ndtr, RW> { |
| 3177 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | 3301 | unsafe { Reg::from_ptr(self.0.add(4usize)) } |
| 3178 | } | 3302 | } |
| 3179 | #[doc = "DMA channel 1 peripheral address register"] | 3303 | #[doc = "stream x peripheral address register"] |
| 3180 | pub fn par(self) -> Reg<u32, RW> { | 3304 | pub fn par(self) -> Reg<u32, RW> { |
| 3181 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | 3305 | unsafe { Reg::from_ptr(self.0.add(8usize)) } |
| 3182 | } | 3306 | } |
| 3183 | #[doc = "DMA channel 1 memory address register"] | 3307 | #[doc = "stream x memory 0 address register"] |
| 3184 | pub fn mar(self) -> Reg<u32, RW> { | 3308 | pub fn m0ar(self) -> Reg<u32, RW> { |
| 3185 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | 3309 | unsafe { Reg::from_ptr(self.0.add(12usize)) } |
| 3186 | } | 3310 | } |
| 3187 | } | 3311 | #[doc = "stream x memory 1 address register"] |
| 3188 | pub mod vals { | 3312 | pub fn m1ar(self) -> Reg<u32, RW> { |
| 3189 | use crate::generic::*; | 3313 | unsafe { Reg::from_ptr(self.0.add(16usize)) } |
| 3190 | #[repr(transparent)] | ||
| 3191 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3192 | pub struct Size(pub u8); | ||
| 3193 | impl Size { | ||
| 3194 | #[doc = "8-bit size"] | ||
| 3195 | pub const BITS8: Self = Self(0); | ||
| 3196 | #[doc = "16-bit size"] | ||
| 3197 | pub const BITS16: Self = Self(0x01); | ||
| 3198 | #[doc = "32-bit size"] | ||
| 3199 | pub const BITS32: Self = Self(0x02); | ||
| 3200 | } | ||
| 3201 | #[repr(transparent)] | ||
| 3202 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3203 | pub struct Memmem(pub u8); | ||
| 3204 | impl Memmem { | ||
| 3205 | #[doc = "Memory to memory mode disabled"] | ||
| 3206 | pub const DISABLED: Self = Self(0); | ||
| 3207 | #[doc = "Memory to memory mode enabled"] | ||
| 3208 | pub const ENABLED: Self = Self(0x01); | ||
| 3209 | } | ||
| 3210 | #[repr(transparent)] | ||
| 3211 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3212 | pub struct Dir(pub u8); | ||
| 3213 | impl Dir { | ||
| 3214 | #[doc = "Read from peripheral"] | ||
| 3215 | pub const FROMPERIPHERAL: Self = Self(0); | ||
| 3216 | #[doc = "Read from memory"] | ||
| 3217 | pub const FROMMEMORY: Self = Self(0x01); | ||
| 3218 | } | ||
| 3219 | #[repr(transparent)] | ||
| 3220 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3221 | pub struct Inc(pub u8); | ||
| 3222 | impl Inc { | ||
| 3223 | #[doc = "Increment mode disabled"] | ||
| 3224 | pub const DISABLED: Self = Self(0); | ||
| 3225 | #[doc = "Increment mode enabled"] | ||
| 3226 | pub const ENABLED: Self = Self(0x01); | ||
| 3227 | } | ||
| 3228 | #[repr(transparent)] | ||
| 3229 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3230 | pub struct Circ(pub u8); | ||
| 3231 | impl Circ { | ||
| 3232 | #[doc = "Circular buffer disabled"] | ||
| 3233 | pub const DISABLED: Self = Self(0); | ||
| 3234 | #[doc = "Circular buffer enabled"] | ||
| 3235 | pub const ENABLED: Self = Self(0x01); | ||
| 3236 | } | 3314 | } |
| 3237 | #[repr(transparent)] | 3315 | #[doc = "stream x FIFO control register"] |
| 3238 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3316 | pub fn fcr(self) -> Reg<regs::Fcr, RW> { |
| 3239 | pub struct Pl(pub u8); | 3317 | unsafe { Reg::from_ptr(self.0.add(20usize)) } |
| 3240 | impl Pl { | ||
| 3241 | #[doc = "Low priority"] | ||
| 3242 | pub const LOW: Self = Self(0); | ||
| 3243 | #[doc = "Medium priority"] | ||
| 3244 | pub const MEDIUM: Self = Self(0x01); | ||
| 3245 | #[doc = "High priority"] | ||
| 3246 | pub const HIGH: Self = Self(0x02); | ||
| 3247 | #[doc = "Very high priority"] | ||
| 3248 | pub const VERYHIGH: Self = Self(0x03); | ||
| 3249 | } | 3318 | } |
| 3250 | } | 3319 | } |
| 3251 | pub mod regs { | 3320 | pub mod regs { |
| 3252 | use crate::generic::*; | 3321 | use crate::generic::*; |
| 3253 | #[doc = "DMA interrupt status register (DMA_ISR)"] | 3322 | #[doc = "stream x configuration register"] |
| 3254 | #[repr(transparent)] | ||
| 3255 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 3256 | pub struct Isr(pub u32); | ||
| 3257 | impl Isr { | ||
| 3258 | #[doc = "Channel 1 Global interrupt flag"] | ||
| 3259 | pub fn gif(&self, n: usize) -> bool { | ||
| 3260 | assert!(n < 7usize); | ||
| 3261 | let offs = 0usize + n * 4usize; | ||
| 3262 | let val = (self.0 >> offs) & 0x01; | ||
| 3263 | val != 0 | ||
| 3264 | } | ||
| 3265 | #[doc = "Channel 1 Global interrupt flag"] | ||
| 3266 | pub fn set_gif(&mut self, n: usize, val: bool) { | ||
| 3267 | assert!(n < 7usize); | ||
| 3268 | let offs = 0usize + n * 4usize; | ||
| 3269 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 3270 | } | ||
| 3271 | #[doc = "Channel 1 Transfer Complete flag"] | ||
| 3272 | pub fn tcif(&self, n: usize) -> bool { | ||
| 3273 | assert!(n < 7usize); | ||
| 3274 | let offs = 1usize + n * 4usize; | ||
| 3275 | let val = (self.0 >> offs) & 0x01; | ||
| 3276 | val != 0 | ||
| 3277 | } | ||
| 3278 | #[doc = "Channel 1 Transfer Complete flag"] | ||
| 3279 | pub fn set_tcif(&mut self, n: usize, val: bool) { | ||
| 3280 | assert!(n < 7usize); | ||
| 3281 | let offs = 1usize + n * 4usize; | ||
| 3282 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 3283 | } | ||
| 3284 | #[doc = "Channel 1 Half Transfer Complete flag"] | ||
| 3285 | pub fn htif(&self, n: usize) -> bool { | ||
| 3286 | assert!(n < 7usize); | ||
| 3287 | let offs = 2usize + n * 4usize; | ||
| 3288 | let val = (self.0 >> offs) & 0x01; | ||
| 3289 | val != 0 | ||
| 3290 | } | ||
| 3291 | #[doc = "Channel 1 Half Transfer Complete flag"] | ||
| 3292 | pub fn set_htif(&mut self, n: usize, val: bool) { | ||
| 3293 | assert!(n < 7usize); | ||
| 3294 | let offs = 2usize + n * 4usize; | ||
| 3295 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 3296 | } | ||
| 3297 | #[doc = "Channel 1 Transfer Error flag"] | ||
| 3298 | pub fn teif(&self, n: usize) -> bool { | ||
| 3299 | assert!(n < 7usize); | ||
| 3300 | let offs = 3usize + n * 4usize; | ||
| 3301 | let val = (self.0 >> offs) & 0x01; | ||
| 3302 | val != 0 | ||
| 3303 | } | ||
| 3304 | #[doc = "Channel 1 Transfer Error flag"] | ||
| 3305 | pub fn set_teif(&mut self, n: usize, val: bool) { | ||
| 3306 | assert!(n < 7usize); | ||
| 3307 | let offs = 3usize + n * 4usize; | ||
| 3308 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 3309 | } | ||
| 3310 | } | ||
| 3311 | impl Default for Isr { | ||
| 3312 | fn default() -> Isr { | ||
| 3313 | Isr(0) | ||
| 3314 | } | ||
| 3315 | } | ||
| 3316 | #[doc = "DMA channel 1 number of data register"] | ||
| 3317 | #[repr(transparent)] | ||
| 3318 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 3319 | pub struct Ndtr(pub u32); | ||
| 3320 | impl Ndtr { | ||
| 3321 | #[doc = "Number of data to transfer"] | ||
| 3322 | pub const fn ndt(&self) -> u16 { | ||
| 3323 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 3324 | val as u16 | ||
| 3325 | } | ||
| 3326 | #[doc = "Number of data to transfer"] | ||
| 3327 | pub fn set_ndt(&mut self, val: u16) { | ||
| 3328 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 3329 | } | ||
| 3330 | } | ||
| 3331 | impl Default for Ndtr { | ||
| 3332 | fn default() -> Ndtr { | ||
| 3333 | Ndtr(0) | ||
| 3334 | } | ||
| 3335 | } | ||
| 3336 | #[doc = "DMA interrupt flag clear register (DMA_IFCR)"] | ||
| 3337 | #[repr(transparent)] | ||
| 3338 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 3339 | pub struct Ifcr(pub u32); | ||
| 3340 | impl Ifcr { | ||
| 3341 | #[doc = "Channel 1 Global interrupt clear"] | ||
| 3342 | pub fn cgif(&self, n: usize) -> bool { | ||
| 3343 | assert!(n < 7usize); | ||
| 3344 | let offs = 0usize + n * 4usize; | ||
| 3345 | let val = (self.0 >> offs) & 0x01; | ||
| 3346 | val != 0 | ||
| 3347 | } | ||
| 3348 | #[doc = "Channel 1 Global interrupt clear"] | ||
| 3349 | pub fn set_cgif(&mut self, n: usize, val: bool) { | ||
| 3350 | assert!(n < 7usize); | ||
| 3351 | let offs = 0usize + n * 4usize; | ||
| 3352 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 3353 | } | ||
| 3354 | #[doc = "Channel 1 Transfer Complete clear"] | ||
| 3355 | pub fn ctcif(&self, n: usize) -> bool { | ||
| 3356 | assert!(n < 7usize); | ||
| 3357 | let offs = 1usize + n * 4usize; | ||
| 3358 | let val = (self.0 >> offs) & 0x01; | ||
| 3359 | val != 0 | ||
| 3360 | } | ||
| 3361 | #[doc = "Channel 1 Transfer Complete clear"] | ||
| 3362 | pub fn set_ctcif(&mut self, n: usize, val: bool) { | ||
| 3363 | assert!(n < 7usize); | ||
| 3364 | let offs = 1usize + n * 4usize; | ||
| 3365 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 3366 | } | ||
| 3367 | #[doc = "Channel 1 Half Transfer clear"] | ||
| 3368 | pub fn chtif(&self, n: usize) -> bool { | ||
| 3369 | assert!(n < 7usize); | ||
| 3370 | let offs = 2usize + n * 4usize; | ||
| 3371 | let val = (self.0 >> offs) & 0x01; | ||
| 3372 | val != 0 | ||
| 3373 | } | ||
| 3374 | #[doc = "Channel 1 Half Transfer clear"] | ||
| 3375 | pub fn set_chtif(&mut self, n: usize, val: bool) { | ||
| 3376 | assert!(n < 7usize); | ||
| 3377 | let offs = 2usize + n * 4usize; | ||
| 3378 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 3379 | } | ||
| 3380 | #[doc = "Channel 1 Transfer Error clear"] | ||
| 3381 | pub fn cteif(&self, n: usize) -> bool { | ||
| 3382 | assert!(n < 7usize); | ||
| 3383 | let offs = 3usize + n * 4usize; | ||
| 3384 | let val = (self.0 >> offs) & 0x01; | ||
| 3385 | val != 0 | ||
| 3386 | } | ||
| 3387 | #[doc = "Channel 1 Transfer Error clear"] | ||
| 3388 | pub fn set_cteif(&mut self, n: usize, val: bool) { | ||
| 3389 | assert!(n < 7usize); | ||
| 3390 | let offs = 3usize + n * 4usize; | ||
| 3391 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 3392 | } | ||
| 3393 | } | ||
| 3394 | impl Default for Ifcr { | ||
| 3395 | fn default() -> Ifcr { | ||
| 3396 | Ifcr(0) | ||
| 3397 | } | ||
| 3398 | } | ||
| 3399 | #[doc = "DMA channel configuration register (DMA_CCR)"] | ||
| 3400 | #[repr(transparent)] | 3323 | #[repr(transparent)] |
| 3401 | #[derive(Copy, Clone, Eq, PartialEq)] | 3324 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 3402 | pub struct Cr(pub u32); | 3325 | pub struct Cr(pub u32); |
| 3403 | impl Cr { | 3326 | impl Cr { |
| 3404 | #[doc = "Channel enable"] | 3327 | #[doc = "Stream enable / flag stream ready when read low"] |
| 3405 | pub const fn en(&self) -> bool { | 3328 | pub const fn en(&self) -> bool { |
| 3406 | let val = (self.0 >> 0usize) & 0x01; | 3329 | let val = (self.0 >> 0usize) & 0x01; |
| 3407 | val != 0 | 3330 | val != 0 |
| 3408 | } | 3331 | } |
| 3409 | #[doc = "Channel enable"] | 3332 | #[doc = "Stream enable / flag stream ready when read low"] |
| 3410 | pub fn set_en(&mut self, val: bool) { | 3333 | pub fn set_en(&mut self, val: bool) { |
| 3411 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 3334 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 3412 | } | 3335 | } |
| 3413 | #[doc = "Transfer complete interrupt enable"] | 3336 | #[doc = "Direct mode error interrupt enable"] |
| 3414 | pub const fn tcie(&self) -> bool { | 3337 | pub const fn dmeie(&self) -> bool { |
| 3415 | let val = (self.0 >> 1usize) & 0x01; | 3338 | let val = (self.0 >> 1usize) & 0x01; |
| 3416 | val != 0 | 3339 | val != 0 |
| 3417 | } | 3340 | } |
| 3418 | #[doc = "Transfer complete interrupt enable"] | 3341 | #[doc = "Direct mode error interrupt enable"] |
| 3419 | pub fn set_tcie(&mut self, val: bool) { | 3342 | pub fn set_dmeie(&mut self, val: bool) { |
| 3420 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 3343 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 3421 | } | 3344 | } |
| 3422 | #[doc = "Half Transfer interrupt enable"] | 3345 | #[doc = "Transfer error interrupt enable"] |
| 3423 | pub const fn htie(&self) -> bool { | 3346 | pub const fn teie(&self) -> bool { |
| 3424 | let val = (self.0 >> 2usize) & 0x01; | 3347 | let val = (self.0 >> 2usize) & 0x01; |
| 3425 | val != 0 | 3348 | val != 0 |
| 3426 | } | 3349 | } |
| 3427 | #[doc = "Half Transfer interrupt enable"] | 3350 | #[doc = "Transfer error interrupt enable"] |
| 3428 | pub fn set_htie(&mut self, val: bool) { | 3351 | pub fn set_teie(&mut self, val: bool) { |
| 3429 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | 3352 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); |
| 3430 | } | 3353 | } |
| 3431 | #[doc = "Transfer error interrupt enable"] | 3354 | #[doc = "Half transfer interrupt enable"] |
| 3432 | pub const fn teie(&self) -> bool { | 3355 | pub const fn htie(&self) -> bool { |
| 3433 | let val = (self.0 >> 3usize) & 0x01; | 3356 | let val = (self.0 >> 3usize) & 0x01; |
| 3434 | val != 0 | 3357 | val != 0 |
| 3435 | } | 3358 | } |
| 3436 | #[doc = "Transfer error interrupt enable"] | 3359 | #[doc = "Half transfer interrupt enable"] |
| 3437 | pub fn set_teie(&mut self, val: bool) { | 3360 | pub fn set_htie(&mut self, val: bool) { |
| 3438 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | 3361 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); |
| 3439 | } | 3362 | } |
| 3363 | #[doc = "Transfer complete interrupt enable"] | ||
| 3364 | pub const fn tcie(&self) -> bool { | ||
| 3365 | let val = (self.0 >> 4usize) & 0x01; | ||
| 3366 | val != 0 | ||
| 3367 | } | ||
| 3368 | #[doc = "Transfer complete interrupt enable"] | ||
| 3369 | pub fn set_tcie(&mut self, val: bool) { | ||
| 3370 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | ||
| 3371 | } | ||
| 3372 | #[doc = "Peripheral flow controller"] | ||
| 3373 | pub const fn pfctrl(&self) -> super::vals::Pfctrl { | ||
| 3374 | let val = (self.0 >> 5usize) & 0x01; | ||
| 3375 | super::vals::Pfctrl(val as u8) | ||
| 3376 | } | ||
| 3377 | #[doc = "Peripheral flow controller"] | ||
| 3378 | pub fn set_pfctrl(&mut self, val: super::vals::Pfctrl) { | ||
| 3379 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize); | ||
| 3380 | } | ||
| 3440 | #[doc = "Data transfer direction"] | 3381 | #[doc = "Data transfer direction"] |
| 3441 | pub const fn dir(&self) -> super::vals::Dir { | 3382 | pub const fn dir(&self) -> super::vals::Dir { |
| 3442 | let val = (self.0 >> 4usize) & 0x01; | 3383 | let val = (self.0 >> 6usize) & 0x03; |
| 3443 | super::vals::Dir(val as u8) | 3384 | super::vals::Dir(val as u8) |
| 3444 | } | 3385 | } |
| 3445 | #[doc = "Data transfer direction"] | 3386 | #[doc = "Data transfer direction"] |
| 3446 | pub fn set_dir(&mut self, val: super::vals::Dir) { | 3387 | pub fn set_dir(&mut self, val: super::vals::Dir) { |
| 3447 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize); | 3388 | self.0 = (self.0 & !(0x03 << 6usize)) | (((val.0 as u32) & 0x03) << 6usize); |
| 3448 | } | 3389 | } |
| 3449 | #[doc = "Circular mode"] | 3390 | #[doc = "Circular mode"] |
| 3450 | pub const fn circ(&self) -> super::vals::Circ { | 3391 | pub const fn circ(&self) -> super::vals::Circ { |
| 3451 | let val = (self.0 >> 5usize) & 0x01; | 3392 | let val = (self.0 >> 8usize) & 0x01; |
| 3452 | super::vals::Circ(val as u8) | 3393 | super::vals::Circ(val as u8) |
| 3453 | } | 3394 | } |
| 3454 | #[doc = "Circular mode"] | 3395 | #[doc = "Circular mode"] |
| 3455 | pub fn set_circ(&mut self, val: super::vals::Circ) { | 3396 | pub fn set_circ(&mut self, val: super::vals::Circ) { |
| 3456 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize); | 3397 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val.0 as u32) & 0x01) << 8usize); |
| 3457 | } | 3398 | } |
| 3458 | #[doc = "Peripheral increment mode"] | 3399 | #[doc = "Peripheral increment mode"] |
| 3459 | pub const fn pinc(&self) -> super::vals::Inc { | 3400 | pub const fn pinc(&self) -> super::vals::Inc { |
| 3460 | let val = (self.0 >> 6usize) & 0x01; | 3401 | let val = (self.0 >> 9usize) & 0x01; |
| 3461 | super::vals::Inc(val as u8) | 3402 | super::vals::Inc(val as u8) |
| 3462 | } | 3403 | } |
| 3463 | #[doc = "Peripheral increment mode"] | 3404 | #[doc = "Peripheral increment mode"] |
| 3464 | pub fn set_pinc(&mut self, val: super::vals::Inc) { | 3405 | pub fn set_pinc(&mut self, val: super::vals::Inc) { |
| 3465 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val.0 as u32) & 0x01) << 6usize); | 3406 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize); |
| 3466 | } | 3407 | } |
| 3467 | #[doc = "Memory increment mode"] | 3408 | #[doc = "Memory increment mode"] |
| 3468 | pub const fn minc(&self) -> super::vals::Inc { | 3409 | pub const fn minc(&self) -> super::vals::Inc { |
| 3469 | let val = (self.0 >> 7usize) & 0x01; | 3410 | let val = (self.0 >> 10usize) & 0x01; |
| 3470 | super::vals::Inc(val as u8) | 3411 | super::vals::Inc(val as u8) |
| 3471 | } | 3412 | } |
| 3472 | #[doc = "Memory increment mode"] | 3413 | #[doc = "Memory increment mode"] |
| 3473 | pub fn set_minc(&mut self, val: super::vals::Inc) { | 3414 | pub fn set_minc(&mut self, val: super::vals::Inc) { |
| 3474 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); | 3415 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); |
| 3475 | } | 3416 | } |
| 3476 | #[doc = "Peripheral size"] | 3417 | #[doc = "Peripheral data size"] |
| 3477 | pub const fn psize(&self) -> super::vals::Size { | 3418 | pub const fn psize(&self) -> super::vals::Size { |
| 3478 | let val = (self.0 >> 8usize) & 0x03; | 3419 | let val = (self.0 >> 11usize) & 0x03; |
| 3479 | super::vals::Size(val as u8) | 3420 | super::vals::Size(val as u8) |
| 3480 | } | 3421 | } |
| 3481 | #[doc = "Peripheral size"] | 3422 | #[doc = "Peripheral data size"] |
| 3482 | pub fn set_psize(&mut self, val: super::vals::Size) { | 3423 | pub fn set_psize(&mut self, val: super::vals::Size) { |
| 3483 | self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize); | 3424 | self.0 = (self.0 & !(0x03 << 11usize)) | (((val.0 as u32) & 0x03) << 11usize); |
| 3484 | } | 3425 | } |
| 3485 | #[doc = "Memory size"] | 3426 | #[doc = "Memory data size"] |
| 3486 | pub const fn msize(&self) -> super::vals::Size { | 3427 | pub const fn msize(&self) -> super::vals::Size { |
| 3487 | let val = (self.0 >> 10usize) & 0x03; | 3428 | let val = (self.0 >> 13usize) & 0x03; |
| 3488 | super::vals::Size(val as u8) | 3429 | super::vals::Size(val as u8) |
| 3489 | } | 3430 | } |
| 3490 | #[doc = "Memory size"] | 3431 | #[doc = "Memory data size"] |
| 3491 | pub fn set_msize(&mut self, val: super::vals::Size) { | 3432 | pub fn set_msize(&mut self, val: super::vals::Size) { |
| 3492 | self.0 = (self.0 & !(0x03 << 10usize)) | (((val.0 as u32) & 0x03) << 10usize); | 3433 | self.0 = (self.0 & !(0x03 << 13usize)) | (((val.0 as u32) & 0x03) << 13usize); |
| 3493 | } | 3434 | } |
| 3494 | #[doc = "Channel Priority level"] | 3435 | #[doc = "Peripheral increment offset size"] |
| 3436 | pub const fn pincos(&self) -> super::vals::Pincos { | ||
| 3437 | let val = (self.0 >> 15usize) & 0x01; | ||
| 3438 | super::vals::Pincos(val as u8) | ||
| 3439 | } | ||
| 3440 | #[doc = "Peripheral increment offset size"] | ||
| 3441 | pub fn set_pincos(&mut self, val: super::vals::Pincos) { | ||
| 3442 | self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize); | ||
| 3443 | } | ||
| 3444 | #[doc = "Priority level"] | ||
| 3495 | pub const fn pl(&self) -> super::vals::Pl { | 3445 | pub const fn pl(&self) -> super::vals::Pl { |
| 3496 | let val = (self.0 >> 12usize) & 0x03; | 3446 | let val = (self.0 >> 16usize) & 0x03; |
| 3497 | super::vals::Pl(val as u8) | 3447 | super::vals::Pl(val as u8) |
| 3498 | } | 3448 | } |
| 3499 | #[doc = "Channel Priority level"] | 3449 | #[doc = "Priority level"] |
| 3500 | pub fn set_pl(&mut self, val: super::vals::Pl) { | 3450 | pub fn set_pl(&mut self, val: super::vals::Pl) { |
| 3501 | self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize); | 3451 | self.0 = (self.0 & !(0x03 << 16usize)) | (((val.0 as u32) & 0x03) << 16usize); |
| 3502 | } | 3452 | } |
| 3503 | #[doc = "Memory to memory mode"] | 3453 | #[doc = "Double buffer mode"] |
| 3504 | pub const fn mem2mem(&self) -> super::vals::Memmem { | 3454 | pub const fn dbm(&self) -> super::vals::Dbm { |
| 3505 | let val = (self.0 >> 14usize) & 0x01; | 3455 | let val = (self.0 >> 18usize) & 0x01; |
| 3506 | super::vals::Memmem(val as u8) | 3456 | super::vals::Dbm(val as u8) |
| 3507 | } | 3457 | } |
| 3508 | #[doc = "Memory to memory mode"] | 3458 | #[doc = "Double buffer mode"] |
| 3509 | pub fn set_mem2mem(&mut self, val: super::vals::Memmem) { | 3459 | pub fn set_dbm(&mut self, val: super::vals::Dbm) { |
| 3510 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); | 3460 | self.0 = (self.0 & !(0x01 << 18usize)) | (((val.0 as u32) & 0x01) << 18usize); |
| 3461 | } | ||
| 3462 | #[doc = "Current target (only in double buffer mode)"] | ||
| 3463 | pub const fn ct(&self) -> super::vals::Ct { | ||
| 3464 | let val = (self.0 >> 19usize) & 0x01; | ||
| 3465 | super::vals::Ct(val as u8) | ||
| 3466 | } | ||
| 3467 | #[doc = "Current target (only in double buffer mode)"] | ||
| 3468 | pub fn set_ct(&mut self, val: super::vals::Ct) { | ||
| 3469 | self.0 = (self.0 & !(0x01 << 19usize)) | (((val.0 as u32) & 0x01) << 19usize); | ||
| 3470 | } | ||
| 3471 | #[doc = "Peripheral burst transfer configuration"] | ||
| 3472 | pub const fn pburst(&self) -> super::vals::Burst { | ||
| 3473 | let val = (self.0 >> 21usize) & 0x03; | ||
| 3474 | super::vals::Burst(val as u8) | ||
| 3475 | } | ||
| 3476 | #[doc = "Peripheral burst transfer configuration"] | ||
| 3477 | pub fn set_pburst(&mut self, val: super::vals::Burst) { | ||
| 3478 | self.0 = (self.0 & !(0x03 << 21usize)) | (((val.0 as u32) & 0x03) << 21usize); | ||
| 3479 | } | ||
| 3480 | #[doc = "Memory burst transfer configuration"] | ||
| 3481 | pub const fn mburst(&self) -> super::vals::Burst { | ||
| 3482 | let val = (self.0 >> 23usize) & 0x03; | ||
| 3483 | super::vals::Burst(val as u8) | ||
| 3484 | } | ||
| 3485 | #[doc = "Memory burst transfer configuration"] | ||
| 3486 | pub fn set_mburst(&mut self, val: super::vals::Burst) { | ||
| 3487 | self.0 = (self.0 & !(0x03 << 23usize)) | (((val.0 as u32) & 0x03) << 23usize); | ||
| 3488 | } | ||
| 3489 | #[doc = "Channel selection"] | ||
| 3490 | pub const fn chsel(&self) -> u8 { | ||
| 3491 | let val = (self.0 >> 25usize) & 0x0f; | ||
| 3492 | val as u8 | ||
| 3493 | } | ||
| 3494 | #[doc = "Channel selection"] | ||
| 3495 | pub fn set_chsel(&mut self, val: u8) { | ||
| 3496 | self.0 = (self.0 & !(0x0f << 25usize)) | (((val as u32) & 0x0f) << 25usize); | ||
| 3511 | } | 3497 | } |
| 3512 | } | 3498 | } |
| 3513 | impl Default for Cr { | 3499 | impl Default for Cr { |
| @@ -3515,185 +3501,147 @@ pub mod dma_v1 { | |||
| 3515 | Cr(0) | 3501 | Cr(0) |
| 3516 | } | 3502 | } |
| 3517 | } | 3503 | } |
| 3518 | } | 3504 | #[doc = "stream x FIFO control register"] |
| 3519 | } | ||
| 3520 | pub mod exti_v1 { | ||
| 3521 | use crate::generic::*; | ||
| 3522 | #[doc = "External interrupt/event controller"] | ||
| 3523 | #[derive(Copy, Clone)] | ||
| 3524 | pub struct Exti(pub *mut u8); | ||
| 3525 | unsafe impl Send for Exti {} | ||
| 3526 | unsafe impl Sync for Exti {} | ||
| 3527 | impl Exti { | ||
| 3528 | #[doc = "Interrupt mask register (EXTI_IMR)"] | ||
| 3529 | pub fn imr(self) -> Reg<regs::Imr, RW> { | ||
| 3530 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 3531 | } | ||
| 3532 | #[doc = "Event mask register (EXTI_EMR)"] | ||
| 3533 | pub fn emr(self) -> Reg<regs::Emr, RW> { | ||
| 3534 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 3535 | } | ||
| 3536 | #[doc = "Rising Trigger selection register (EXTI_RTSR)"] | ||
| 3537 | pub fn rtsr(self) -> Reg<regs::Rtsr, RW> { | ||
| 3538 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 3539 | } | ||
| 3540 | #[doc = "Falling Trigger selection register (EXTI_FTSR)"] | ||
| 3541 | pub fn ftsr(self) -> Reg<regs::Ftsr, RW> { | ||
| 3542 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 3543 | } | ||
| 3544 | #[doc = "Software interrupt event register (EXTI_SWIER)"] | ||
| 3545 | pub fn swier(self) -> Reg<regs::Swier, RW> { | ||
| 3546 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 3547 | } | ||
| 3548 | #[doc = "Pending register (EXTI_PR)"] | ||
| 3549 | pub fn pr(self) -> Reg<regs::Pr, RW> { | ||
| 3550 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | ||
| 3551 | } | ||
| 3552 | } | ||
| 3553 | pub mod regs { | ||
| 3554 | use crate::generic::*; | ||
| 3555 | #[doc = "Rising Trigger selection register (EXTI_RTSR)"] | ||
| 3556 | #[repr(transparent)] | 3505 | #[repr(transparent)] |
| 3557 | #[derive(Copy, Clone, Eq, PartialEq)] | 3506 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 3558 | pub struct Rtsr(pub u32); | 3507 | pub struct Fcr(pub u32); |
| 3559 | impl Rtsr { | 3508 | impl Fcr { |
| 3560 | #[doc = "Rising trigger event configuration of line 0"] | 3509 | #[doc = "FIFO threshold selection"] |
| 3561 | pub fn tr(&self, n: usize) -> super::vals::Tr { | 3510 | pub const fn fth(&self) -> super::vals::Fth { |
| 3562 | assert!(n < 23usize); | 3511 | let val = (self.0 >> 0usize) & 0x03; |
| 3563 | let offs = 0usize + n * 1usize; | 3512 | super::vals::Fth(val as u8) |
| 3564 | let val = (self.0 >> offs) & 0x01; | ||
| 3565 | super::vals::Tr(val as u8) | ||
| 3566 | } | 3513 | } |
| 3567 | #[doc = "Rising trigger event configuration of line 0"] | 3514 | #[doc = "FIFO threshold selection"] |
| 3568 | pub fn set_tr(&mut self, n: usize, val: super::vals::Tr) { | 3515 | pub fn set_fth(&mut self, val: super::vals::Fth) { |
| 3569 | assert!(n < 23usize); | 3516 | self.0 = (self.0 & !(0x03 << 0usize)) | (((val.0 as u32) & 0x03) << 0usize); |
| 3570 | let offs = 0usize + n * 1usize; | ||
| 3571 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 3572 | } | 3517 | } |
| 3573 | } | 3518 | #[doc = "Direct mode disable"] |
| 3574 | impl Default for Rtsr { | 3519 | pub const fn dmdis(&self) -> super::vals::Dmdis { |
| 3575 | fn default() -> Rtsr { | 3520 | let val = (self.0 >> 2usize) & 0x01; |
| 3576 | Rtsr(0) | 3521 | super::vals::Dmdis(val as u8) |
| 3577 | } | 3522 | } |
| 3578 | } | 3523 | #[doc = "Direct mode disable"] |
| 3579 | #[doc = "Falling Trigger selection register (EXTI_FTSR)"] | 3524 | pub fn set_dmdis(&mut self, val: super::vals::Dmdis) { |
| 3580 | #[repr(transparent)] | 3525 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); |
| 3581 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 3582 | pub struct Ftsr(pub u32); | ||
| 3583 | impl Ftsr { | ||
| 3584 | #[doc = "Falling trigger event configuration of line 0"] | ||
| 3585 | pub fn tr(&self, n: usize) -> super::vals::Tr { | ||
| 3586 | assert!(n < 23usize); | ||
| 3587 | let offs = 0usize + n * 1usize; | ||
| 3588 | let val = (self.0 >> offs) & 0x01; | ||
| 3589 | super::vals::Tr(val as u8) | ||
| 3590 | } | 3526 | } |
| 3591 | #[doc = "Falling trigger event configuration of line 0"] | 3527 | #[doc = "FIFO status"] |
| 3592 | pub fn set_tr(&mut self, n: usize, val: super::vals::Tr) { | 3528 | pub const fn fs(&self) -> super::vals::Fs { |
| 3593 | assert!(n < 23usize); | 3529 | let val = (self.0 >> 3usize) & 0x07; |
| 3594 | let offs = 0usize + n * 1usize; | 3530 | super::vals::Fs(val as u8) |
| 3595 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | 3531 | } |
| 3532 | #[doc = "FIFO status"] | ||
| 3533 | pub fn set_fs(&mut self, val: super::vals::Fs) { | ||
| 3534 | self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize); | ||
| 3535 | } | ||
| 3536 | #[doc = "FIFO error interrupt enable"] | ||
| 3537 | pub const fn feie(&self) -> bool { | ||
| 3538 | let val = (self.0 >> 7usize) & 0x01; | ||
| 3539 | val != 0 | ||
| 3540 | } | ||
| 3541 | #[doc = "FIFO error interrupt enable"] | ||
| 3542 | pub fn set_feie(&mut self, val: bool) { | ||
| 3543 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 3596 | } | 3544 | } |
| 3597 | } | 3545 | } |
| 3598 | impl Default for Ftsr { | 3546 | impl Default for Fcr { |
| 3599 | fn default() -> Ftsr { | 3547 | fn default() -> Fcr { |
| 3600 | Ftsr(0) | 3548 | Fcr(0) |
| 3601 | } | 3549 | } |
| 3602 | } | 3550 | } |
| 3603 | #[doc = "Event mask register (EXTI_EMR)"] | 3551 | #[doc = "interrupt register"] |
| 3604 | #[repr(transparent)] | 3552 | #[repr(transparent)] |
| 3605 | #[derive(Copy, Clone, Eq, PartialEq)] | 3553 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 3606 | pub struct Emr(pub u32); | 3554 | pub struct Ixr(pub u32); |
| 3607 | impl Emr { | 3555 | impl Ixr { |
| 3608 | #[doc = "Event Mask on line 0"] | 3556 | #[doc = "Stream x FIFO error interrupt flag (x=3..0)"] |
| 3609 | pub fn mr(&self, n: usize) -> super::vals::Mr { | 3557 | pub fn feif(&self, n: usize) -> bool { |
| 3610 | assert!(n < 23usize); | 3558 | assert!(n < 4usize); |
| 3611 | let offs = 0usize + n * 1usize; | 3559 | let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); |
| 3612 | let val = (self.0 >> offs) & 0x01; | 3560 | let val = (self.0 >> offs) & 0x01; |
| 3613 | super::vals::Mr(val as u8) | 3561 | val != 0 |
| 3614 | } | 3562 | } |
| 3615 | #[doc = "Event Mask on line 0"] | 3563 | #[doc = "Stream x FIFO error interrupt flag (x=3..0)"] |
| 3616 | pub fn set_mr(&mut self, n: usize, val: super::vals::Mr) { | 3564 | pub fn set_feif(&mut self, n: usize, val: bool) { |
| 3617 | assert!(n < 23usize); | 3565 | assert!(n < 4usize); |
| 3618 | let offs = 0usize + n * 1usize; | 3566 | let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); |
| 3619 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | 3567 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); |
| 3620 | } | 3568 | } |
| 3621 | } | 3569 | #[doc = "Stream x direct mode error interrupt flag (x=3..0)"] |
| 3622 | impl Default for Emr { | 3570 | pub fn dmeif(&self, n: usize) -> bool { |
| 3623 | fn default() -> Emr { | 3571 | assert!(n < 4usize); |
| 3624 | Emr(0) | 3572 | let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); |
| 3573 | let val = (self.0 >> offs) & 0x01; | ||
| 3574 | val != 0 | ||
| 3625 | } | 3575 | } |
| 3626 | } | 3576 | #[doc = "Stream x direct mode error interrupt flag (x=3..0)"] |
| 3627 | #[doc = "Software interrupt event register (EXTI_SWIER)"] | 3577 | pub fn set_dmeif(&mut self, n: usize, val: bool) { |
| 3628 | #[repr(transparent)] | 3578 | assert!(n < 4usize); |
| 3629 | #[derive(Copy, Clone, Eq, PartialEq)] | 3579 | let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); |
| 3630 | pub struct Swier(pub u32); | 3580 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); |
| 3631 | impl Swier { | 3581 | } |
| 3632 | #[doc = "Software Interrupt on line 0"] | 3582 | #[doc = "Stream x transfer error interrupt flag (x=3..0)"] |
| 3633 | pub fn swier(&self, n: usize) -> bool { | 3583 | pub fn teif(&self, n: usize) -> bool { |
| 3634 | assert!(n < 23usize); | 3584 | assert!(n < 4usize); |
| 3635 | let offs = 0usize + n * 1usize; | 3585 | let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); |
| 3636 | let val = (self.0 >> offs) & 0x01; | 3586 | let val = (self.0 >> offs) & 0x01; |
| 3637 | val != 0 | 3587 | val != 0 |
| 3638 | } | 3588 | } |
| 3639 | #[doc = "Software Interrupt on line 0"] | 3589 | #[doc = "Stream x transfer error interrupt flag (x=3..0)"] |
| 3640 | pub fn set_swier(&mut self, n: usize, val: bool) { | 3590 | pub fn set_teif(&mut self, n: usize, val: bool) { |
| 3641 | assert!(n < 23usize); | 3591 | assert!(n < 4usize); |
| 3642 | let offs = 0usize + n * 1usize; | 3592 | let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); |
| 3643 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | 3593 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); |
| 3644 | } | 3594 | } |
| 3645 | } | 3595 | #[doc = "Stream x half transfer interrupt flag (x=3..0)"] |
| 3646 | impl Default for Swier { | 3596 | pub fn htif(&self, n: usize) -> bool { |
| 3647 | fn default() -> Swier { | 3597 | assert!(n < 4usize); |
| 3648 | Swier(0) | 3598 | let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); |
| 3599 | let val = (self.0 >> offs) & 0x01; | ||
| 3600 | val != 0 | ||
| 3649 | } | 3601 | } |
| 3650 | } | 3602 | #[doc = "Stream x half transfer interrupt flag (x=3..0)"] |
| 3651 | #[doc = "Interrupt mask register (EXTI_IMR)"] | 3603 | pub fn set_htif(&mut self, n: usize, val: bool) { |
| 3652 | #[repr(transparent)] | 3604 | assert!(n < 4usize); |
| 3653 | #[derive(Copy, Clone, Eq, PartialEq)] | 3605 | let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); |
| 3654 | pub struct Imr(pub u32); | 3606 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); |
| 3655 | impl Imr { | 3607 | } |
| 3656 | #[doc = "Interrupt Mask on line 0"] | 3608 | #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"] |
| 3657 | pub fn mr(&self, n: usize) -> super::vals::Mr { | 3609 | pub fn tcif(&self, n: usize) -> bool { |
| 3658 | assert!(n < 23usize); | 3610 | assert!(n < 4usize); |
| 3659 | let offs = 0usize + n * 1usize; | 3611 | let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); |
| 3660 | let val = (self.0 >> offs) & 0x01; | 3612 | let val = (self.0 >> offs) & 0x01; |
| 3661 | super::vals::Mr(val as u8) | 3613 | val != 0 |
| 3662 | } | 3614 | } |
| 3663 | #[doc = "Interrupt Mask on line 0"] | 3615 | #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"] |
| 3664 | pub fn set_mr(&mut self, n: usize, val: super::vals::Mr) { | 3616 | pub fn set_tcif(&mut self, n: usize, val: bool) { |
| 3665 | assert!(n < 23usize); | 3617 | assert!(n < 4usize); |
| 3666 | let offs = 0usize + n * 1usize; | 3618 | let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); |
| 3667 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | 3619 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); |
| 3668 | } | 3620 | } |
| 3669 | } | 3621 | } |
| 3670 | impl Default for Imr { | 3622 | impl Default for Ixr { |
| 3671 | fn default() -> Imr { | 3623 | fn default() -> Ixr { |
| 3672 | Imr(0) | 3624 | Ixr(0) |
| 3673 | } | 3625 | } |
| 3674 | } | 3626 | } |
| 3675 | #[doc = "Pending register (EXTI_PR)"] | 3627 | #[doc = "stream x number of data register"] |
| 3676 | #[repr(transparent)] | 3628 | #[repr(transparent)] |
| 3677 | #[derive(Copy, Clone, Eq, PartialEq)] | 3629 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 3678 | pub struct Pr(pub u32); | 3630 | pub struct Ndtr(pub u32); |
| 3679 | impl Pr { | 3631 | impl Ndtr { |
| 3680 | #[doc = "Pending bit 0"] | 3632 | #[doc = "Number of data items to transfer"] |
| 3681 | pub fn pr(&self, n: usize) -> bool { | 3633 | pub const fn ndt(&self) -> u16 { |
| 3682 | assert!(n < 23usize); | 3634 | let val = (self.0 >> 0usize) & 0xffff; |
| 3683 | let offs = 0usize + n * 1usize; | 3635 | val as u16 |
| 3684 | let val = (self.0 >> offs) & 0x01; | ||
| 3685 | val != 0 | ||
| 3686 | } | 3636 | } |
| 3687 | #[doc = "Pending bit 0"] | 3637 | #[doc = "Number of data items to transfer"] |
| 3688 | pub fn set_pr(&mut self, n: usize, val: bool) { | 3638 | pub fn set_ndt(&mut self, val: u16) { |
| 3689 | assert!(n < 23usize); | 3639 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); |
| 3690 | let offs = 0usize + n * 1usize; | ||
| 3691 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 3692 | } | 3640 | } |
| 3693 | } | 3641 | } |
| 3694 | impl Default for Pr { | 3642 | impl Default for Ndtr { |
| 3695 | fn default() -> Pr { | 3643 | fn default() -> Ndtr { |
| 3696 | Pr(0) | 3644 | Ndtr(0) |
| 3697 | } | 3645 | } |
| 3698 | } | 3646 | } |
| 3699 | } | 3647 | } |
| @@ -3701,214 +3649,446 @@ pub mod exti_v1 { | |||
| 3701 | use crate::generic::*; | 3649 | use crate::generic::*; |
| 3702 | #[repr(transparent)] | 3650 | #[repr(transparent)] |
| 3703 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3651 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3704 | pub struct Swierw(pub u8); | 3652 | pub struct Pfctrl(pub u8); |
| 3705 | impl Swierw { | 3653 | impl Pfctrl { |
| 3706 | #[doc = "Generates an interrupt request"] | 3654 | #[doc = "The DMA is the flow controller"] |
| 3707 | pub const PEND: Self = Self(0x01); | 3655 | pub const DMA: Self = Self(0); |
| 3656 | #[doc = "The peripheral is the flow controller"] | ||
| 3657 | pub const PERIPHERAL: Self = Self(0x01); | ||
| 3708 | } | 3658 | } |
| 3709 | #[repr(transparent)] | 3659 | #[repr(transparent)] |
| 3710 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3660 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3711 | pub struct Mr(pub u8); | 3661 | pub struct Circ(pub u8); |
| 3712 | impl Mr { | 3662 | impl Circ { |
| 3713 | #[doc = "Interrupt request line is masked"] | 3663 | #[doc = "Circular mode disabled"] |
| 3714 | pub const MASKED: Self = Self(0); | 3664 | pub const DISABLED: Self = Self(0); |
| 3715 | #[doc = "Interrupt request line is unmasked"] | 3665 | #[doc = "Circular mode enabled"] |
| 3716 | pub const UNMASKED: Self = Self(0x01); | 3666 | pub const ENABLED: Self = Self(0x01); |
| 3717 | } | 3667 | } |
| 3718 | #[repr(transparent)] | 3668 | #[repr(transparent)] |
| 3719 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3669 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3720 | pub struct Prr(pub u8); | 3670 | pub struct Ct(pub u8); |
| 3721 | impl Prr { | 3671 | impl Ct { |
| 3722 | #[doc = "No trigger request occurred"] | 3672 | #[doc = "The current target memory is Memory 0"] |
| 3723 | pub const NOTPENDING: Self = Self(0); | 3673 | pub const MEMORY0: Self = Self(0); |
| 3724 | #[doc = "Selected trigger request occurred"] | 3674 | #[doc = "The current target memory is Memory 1"] |
| 3725 | pub const PENDING: Self = Self(0x01); | 3675 | pub const MEMORY1: Self = Self(0x01); |
| 3726 | } | 3676 | } |
| 3727 | #[repr(transparent)] | 3677 | #[repr(transparent)] |
| 3728 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3678 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3729 | pub struct Prw(pub u8); | 3679 | pub struct Size(pub u8); |
| 3730 | impl Prw { | 3680 | impl Size { |
| 3731 | #[doc = "Clears pending bit"] | 3681 | #[doc = "Byte (8-bit)"] |
| 3732 | pub const CLEAR: Self = Self(0x01); | 3682 | pub const BITS8: Self = Self(0); |
| 3683 | #[doc = "Half-word (16-bit)"] | ||
| 3684 | pub const BITS16: Self = Self(0x01); | ||
| 3685 | #[doc = "Word (32-bit)"] | ||
| 3686 | pub const BITS32: Self = Self(0x02); | ||
| 3733 | } | 3687 | } |
| 3734 | #[repr(transparent)] | 3688 | #[repr(transparent)] |
| 3735 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3689 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3736 | pub struct Tr(pub u8); | 3690 | pub struct Inc(pub u8); |
| 3737 | impl Tr { | 3691 | impl Inc { |
| 3738 | #[doc = "Falling edge trigger is disabled"] | 3692 | #[doc = "Address pointer is fixed"] |
| 3693 | pub const FIXED: Self = Self(0); | ||
| 3694 | #[doc = "Address pointer is incremented after each data transfer"] | ||
| 3695 | pub const INCREMENTED: Self = Self(0x01); | ||
| 3696 | } | ||
| 3697 | #[repr(transparent)] | ||
| 3698 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3699 | pub struct Burst(pub u8); | ||
| 3700 | impl Burst { | ||
| 3701 | #[doc = "Single transfer"] | ||
| 3702 | pub const SINGLE: Self = Self(0); | ||
| 3703 | #[doc = "Incremental burst of 4 beats"] | ||
| 3704 | pub const INCR4: Self = Self(0x01); | ||
| 3705 | #[doc = "Incremental burst of 8 beats"] | ||
| 3706 | pub const INCR8: Self = Self(0x02); | ||
| 3707 | #[doc = "Incremental burst of 16 beats"] | ||
| 3708 | pub const INCR16: Self = Self(0x03); | ||
| 3709 | } | ||
| 3710 | #[repr(transparent)] | ||
| 3711 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3712 | pub struct Fth(pub u8); | ||
| 3713 | impl Fth { | ||
| 3714 | #[doc = "1/4 full FIFO"] | ||
| 3715 | pub const QUARTER: Self = Self(0); | ||
| 3716 | #[doc = "1/2 full FIFO"] | ||
| 3717 | pub const HALF: Self = Self(0x01); | ||
| 3718 | #[doc = "3/4 full FIFO"] | ||
| 3719 | pub const THREEQUARTERS: Self = Self(0x02); | ||
| 3720 | #[doc = "Full FIFO"] | ||
| 3721 | pub const FULL: Self = Self(0x03); | ||
| 3722 | } | ||
| 3723 | #[repr(transparent)] | ||
| 3724 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3725 | pub struct Pincos(pub u8); | ||
| 3726 | impl Pincos { | ||
| 3727 | #[doc = "The offset size for the peripheral address calculation is linked to the PSIZE"] | ||
| 3728 | pub const PSIZE: Self = Self(0); | ||
| 3729 | #[doc = "The offset size for the peripheral address calculation is fixed to 4 (32-bit alignment)"] | ||
| 3730 | pub const FIXED4: Self = Self(0x01); | ||
| 3731 | } | ||
| 3732 | #[repr(transparent)] | ||
| 3733 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3734 | pub struct Dbm(pub u8); | ||
| 3735 | impl Dbm { | ||
| 3736 | #[doc = "No buffer switching at the end of transfer"] | ||
| 3739 | pub const DISABLED: Self = Self(0); | 3737 | pub const DISABLED: Self = Self(0); |
| 3740 | #[doc = "Falling edge trigger is enabled"] | 3738 | #[doc = "Memory target switched at the end of the DMA transfer"] |
| 3741 | pub const ENABLED: Self = Self(0x01); | 3739 | pub const ENABLED: Self = Self(0x01); |
| 3742 | } | 3740 | } |
| 3741 | #[repr(transparent)] | ||
| 3742 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3743 | pub struct Pl(pub u8); | ||
| 3744 | impl Pl { | ||
| 3745 | #[doc = "Low"] | ||
| 3746 | pub const LOW: Self = Self(0); | ||
| 3747 | #[doc = "Medium"] | ||
| 3748 | pub const MEDIUM: Self = Self(0x01); | ||
| 3749 | #[doc = "High"] | ||
| 3750 | pub const HIGH: Self = Self(0x02); | ||
| 3751 | #[doc = "Very high"] | ||
| 3752 | pub const VERYHIGH: Self = Self(0x03); | ||
| 3753 | } | ||
| 3754 | #[repr(transparent)] | ||
| 3755 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3756 | pub struct Fs(pub u8); | ||
| 3757 | impl Fs { | ||
| 3758 | #[doc = "0 < fifo_level < 1/4"] | ||
| 3759 | pub const QUARTER1: Self = Self(0); | ||
| 3760 | #[doc = "1/4 <= fifo_level < 1/2"] | ||
| 3761 | pub const QUARTER2: Self = Self(0x01); | ||
| 3762 | #[doc = "1/2 <= fifo_level < 3/4"] | ||
| 3763 | pub const QUARTER3: Self = Self(0x02); | ||
| 3764 | #[doc = "3/4 <= fifo_level < full"] | ||
| 3765 | pub const QUARTER4: Self = Self(0x03); | ||
| 3766 | #[doc = "FIFO is empty"] | ||
| 3767 | pub const EMPTY: Self = Self(0x04); | ||
| 3768 | #[doc = "FIFO is full"] | ||
| 3769 | pub const FULL: Self = Self(0x05); | ||
| 3770 | } | ||
| 3771 | #[repr(transparent)] | ||
| 3772 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3773 | pub struct Dir(pub u8); | ||
| 3774 | impl Dir { | ||
| 3775 | #[doc = "Peripheral-to-memory"] | ||
| 3776 | pub const PERIPHERALTOMEMORY: Self = Self(0); | ||
| 3777 | #[doc = "Memory-to-peripheral"] | ||
| 3778 | pub const MEMORYTOPERIPHERAL: Self = Self(0x01); | ||
| 3779 | #[doc = "Memory-to-memory"] | ||
| 3780 | pub const MEMORYTOMEMORY: Self = Self(0x02); | ||
| 3781 | } | ||
| 3782 | #[repr(transparent)] | ||
| 3783 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3784 | pub struct Dmdis(pub u8); | ||
| 3785 | impl Dmdis { | ||
| 3786 | #[doc = "Direct mode is enabled"] | ||
| 3787 | pub const ENABLED: Self = Self(0); | ||
| 3788 | #[doc = "Direct mode is disabled"] | ||
| 3789 | pub const DISABLED: Self = Self(0x01); | ||
| 3790 | } | ||
| 3743 | } | 3791 | } |
| 3744 | } | 3792 | } |
| 3745 | pub mod syscfg_f4 { | 3793 | pub mod gpio_v1 { |
| 3746 | use crate::generic::*; | 3794 | use crate::generic::*; |
| 3747 | #[doc = "System configuration controller"] | 3795 | #[doc = "General purpose I/O"] |
| 3748 | #[derive(Copy, Clone)] | 3796 | #[derive(Copy, Clone)] |
| 3749 | pub struct Syscfg(pub *mut u8); | 3797 | pub struct Gpio(pub *mut u8); |
| 3750 | unsafe impl Send for Syscfg {} | 3798 | unsafe impl Send for Gpio {} |
| 3751 | unsafe impl Sync for Syscfg {} | 3799 | unsafe impl Sync for Gpio {} |
| 3752 | impl Syscfg { | 3800 | impl Gpio { |
| 3753 | #[doc = "memory remap register"] | 3801 | #[doc = "Port configuration register low (GPIOn_CRL)"] |
| 3754 | pub fn memrm(self) -> Reg<regs::Memrm, RW> { | 3802 | pub fn cr(self, n: usize) -> Reg<regs::Cr, RW> { |
| 3755 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | 3803 | assert!(n < 2usize); |
| 3804 | unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) } | ||
| 3756 | } | 3805 | } |
| 3757 | #[doc = "peripheral mode configuration register"] | 3806 | #[doc = "Port input data register (GPIOn_IDR)"] |
| 3758 | pub fn pmc(self) -> Reg<regs::Pmc, RW> { | 3807 | pub fn idr(self) -> Reg<regs::Idr, R> { |
| 3759 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | 3808 | unsafe { Reg::from_ptr(self.0.add(8usize)) } |
| 3760 | } | 3809 | } |
| 3761 | #[doc = "external interrupt configuration register"] | 3810 | #[doc = "Port output data register (GPIOn_ODR)"] |
| 3762 | pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> { | 3811 | pub fn odr(self) -> Reg<regs::Odr, RW> { |
| 3763 | assert!(n < 4usize); | 3812 | unsafe { Reg::from_ptr(self.0.add(12usize)) } |
| 3764 | unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) } | ||
| 3765 | } | 3813 | } |
| 3766 | #[doc = "Compensation cell control register"] | 3814 | #[doc = "Port bit set/reset register (GPIOn_BSRR)"] |
| 3767 | pub fn cmpcr(self) -> Reg<regs::Cmpcr, R> { | 3815 | pub fn bsrr(self) -> Reg<regs::Bsrr, W> { |
| 3768 | unsafe { Reg::from_ptr(self.0.add(32usize)) } | 3816 | unsafe { Reg::from_ptr(self.0.add(16usize)) } |
| 3817 | } | ||
| 3818 | #[doc = "Port bit reset register (GPIOn_BRR)"] | ||
| 3819 | pub fn brr(self) -> Reg<regs::Brr, W> { | ||
| 3820 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | ||
| 3821 | } | ||
| 3822 | #[doc = "Port configuration lock register"] | ||
| 3823 | pub fn lckr(self) -> Reg<regs::Lckr, RW> { | ||
| 3824 | unsafe { Reg::from_ptr(self.0.add(24usize)) } | ||
| 3769 | } | 3825 | } |
| 3770 | } | 3826 | } |
| 3771 | pub mod regs { | 3827 | pub mod regs { |
| 3772 | use crate::generic::*; | 3828 | use crate::generic::*; |
| 3773 | #[doc = "memory remap register"] | 3829 | #[doc = "Port input data register (GPIOn_IDR)"] |
| 3774 | #[repr(transparent)] | 3830 | #[repr(transparent)] |
| 3775 | #[derive(Copy, Clone, Eq, PartialEq)] | 3831 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 3776 | pub struct Memrm(pub u32); | 3832 | pub struct Idr(pub u32); |
| 3777 | impl Memrm { | 3833 | impl Idr { |
| 3778 | #[doc = "Memory mapping selection"] | 3834 | #[doc = "Port input data"] |
| 3779 | pub const fn mem_mode(&self) -> u8 { | 3835 | pub fn idr(&self, n: usize) -> super::vals::Idr { |
| 3780 | let val = (self.0 >> 0usize) & 0x07; | 3836 | assert!(n < 16usize); |
| 3781 | val as u8 | 3837 | let offs = 0usize + n * 1usize; |
| 3838 | let val = (self.0 >> offs) & 0x01; | ||
| 3839 | super::vals::Idr(val as u8) | ||
| 3782 | } | 3840 | } |
| 3783 | #[doc = "Memory mapping selection"] | 3841 | #[doc = "Port input data"] |
| 3784 | pub fn set_mem_mode(&mut self, val: u8) { | 3842 | pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) { |
| 3785 | self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); | 3843 | assert!(n < 16usize); |
| 3844 | let offs = 0usize + n * 1usize; | ||
| 3845 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 3786 | } | 3846 | } |
| 3787 | #[doc = "Flash bank mode selection"] | 3847 | } |
| 3788 | pub const fn fb_mode(&self) -> bool { | 3848 | impl Default for Idr { |
| 3789 | let val = (self.0 >> 8usize) & 0x01; | 3849 | fn default() -> Idr { |
| 3790 | val != 0 | 3850 | Idr(0) |
| 3791 | } | 3851 | } |
| 3792 | #[doc = "Flash bank mode selection"] | 3852 | } |
| 3793 | pub fn set_fb_mode(&mut self, val: bool) { | 3853 | #[doc = "Port output data register (GPIOn_ODR)"] |
| 3794 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 3854 | #[repr(transparent)] |
| 3855 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 3856 | pub struct Odr(pub u32); | ||
| 3857 | impl Odr { | ||
| 3858 | #[doc = "Port output data"] | ||
| 3859 | pub fn odr(&self, n: usize) -> super::vals::Odr { | ||
| 3860 | assert!(n < 16usize); | ||
| 3861 | let offs = 0usize + n * 1usize; | ||
| 3862 | let val = (self.0 >> offs) & 0x01; | ||
| 3863 | super::vals::Odr(val as u8) | ||
| 3795 | } | 3864 | } |
| 3796 | #[doc = "FMC memory mapping swap"] | 3865 | #[doc = "Port output data"] |
| 3797 | pub const fn swp_fmc(&self) -> u8 { | 3866 | pub fn set_odr(&mut self, n: usize, val: super::vals::Odr) { |
| 3798 | let val = (self.0 >> 10usize) & 0x03; | 3867 | assert!(n < 16usize); |
| 3799 | val as u8 | 3868 | let offs = 0usize + n * 1usize; |
| 3869 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 3800 | } | 3870 | } |
| 3801 | #[doc = "FMC memory mapping swap"] | 3871 | } |
| 3802 | pub fn set_swp_fmc(&mut self, val: u8) { | 3872 | impl Default for Odr { |
| 3803 | self.0 = (self.0 & !(0x03 << 10usize)) | (((val as u32) & 0x03) << 10usize); | 3873 | fn default() -> Odr { |
| 3874 | Odr(0) | ||
| 3804 | } | 3875 | } |
| 3805 | } | 3876 | } |
| 3806 | impl Default for Memrm { | 3877 | #[doc = "Port bit reset register (GPIOn_BRR)"] |
| 3807 | fn default() -> Memrm { | 3878 | #[repr(transparent)] |
| 3808 | Memrm(0) | 3879 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 3880 | pub struct Brr(pub u32); | ||
| 3881 | impl Brr { | ||
| 3882 | #[doc = "Reset bit"] | ||
| 3883 | pub fn br(&self, n: usize) -> bool { | ||
| 3884 | assert!(n < 16usize); | ||
| 3885 | let offs = 0usize + n * 1usize; | ||
| 3886 | let val = (self.0 >> offs) & 0x01; | ||
| 3887 | val != 0 | ||
| 3888 | } | ||
| 3889 | #[doc = "Reset bit"] | ||
| 3890 | pub fn set_br(&mut self, n: usize, val: bool) { | ||
| 3891 | assert!(n < 16usize); | ||
| 3892 | let offs = 0usize + n * 1usize; | ||
| 3893 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 3809 | } | 3894 | } |
| 3810 | } | 3895 | } |
| 3811 | #[doc = "Compensation cell control register"] | 3896 | impl Default for Brr { |
| 3897 | fn default() -> Brr { | ||
| 3898 | Brr(0) | ||
| 3899 | } | ||
| 3900 | } | ||
| 3901 | #[doc = "Port bit set/reset register (GPIOn_BSRR)"] | ||
| 3812 | #[repr(transparent)] | 3902 | #[repr(transparent)] |
| 3813 | #[derive(Copy, Clone, Eq, PartialEq)] | 3903 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 3814 | pub struct Cmpcr(pub u32); | 3904 | pub struct Bsrr(pub u32); |
| 3815 | impl Cmpcr { | 3905 | impl Bsrr { |
| 3816 | #[doc = "Compensation cell power-down"] | 3906 | #[doc = "Set bit"] |
| 3817 | pub const fn cmp_pd(&self) -> bool { | 3907 | pub fn bs(&self, n: usize) -> bool { |
| 3818 | let val = (self.0 >> 0usize) & 0x01; | 3908 | assert!(n < 16usize); |
| 3909 | let offs = 0usize + n * 1usize; | ||
| 3910 | let val = (self.0 >> offs) & 0x01; | ||
| 3819 | val != 0 | 3911 | val != 0 |
| 3820 | } | 3912 | } |
| 3821 | #[doc = "Compensation cell power-down"] | 3913 | #[doc = "Set bit"] |
| 3822 | pub fn set_cmp_pd(&mut self, val: bool) { | 3914 | pub fn set_bs(&mut self, n: usize, val: bool) { |
| 3823 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 3915 | assert!(n < 16usize); |
| 3916 | let offs = 0usize + n * 1usize; | ||
| 3917 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 3824 | } | 3918 | } |
| 3825 | #[doc = "READY"] | 3919 | #[doc = "Reset bit"] |
| 3826 | pub const fn ready(&self) -> bool { | 3920 | pub fn br(&self, n: usize) -> bool { |
| 3827 | let val = (self.0 >> 8usize) & 0x01; | 3921 | assert!(n < 16usize); |
| 3922 | let offs = 16usize + n * 1usize; | ||
| 3923 | let val = (self.0 >> offs) & 0x01; | ||
| 3828 | val != 0 | 3924 | val != 0 |
| 3829 | } | 3925 | } |
| 3830 | #[doc = "READY"] | 3926 | #[doc = "Reset bit"] |
| 3831 | pub fn set_ready(&mut self, val: bool) { | 3927 | pub fn set_br(&mut self, n: usize, val: bool) { |
| 3832 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 3928 | assert!(n < 16usize); |
| 3929 | let offs = 16usize + n * 1usize; | ||
| 3930 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 3833 | } | 3931 | } |
| 3834 | } | 3932 | } |
| 3835 | impl Default for Cmpcr { | 3933 | impl Default for Bsrr { |
| 3836 | fn default() -> Cmpcr { | 3934 | fn default() -> Bsrr { |
| 3837 | Cmpcr(0) | 3935 | Bsrr(0) |
| 3838 | } | 3936 | } |
| 3839 | } | 3937 | } |
| 3840 | #[doc = "external interrupt configuration register"] | 3938 | #[doc = "Port configuration register (GPIOn_CRx)"] |
| 3841 | #[repr(transparent)] | 3939 | #[repr(transparent)] |
| 3842 | #[derive(Copy, Clone, Eq, PartialEq)] | 3940 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 3843 | pub struct Exticr(pub u32); | 3941 | pub struct Cr(pub u32); |
| 3844 | impl Exticr { | 3942 | impl Cr { |
| 3845 | #[doc = "EXTI x configuration"] | 3943 | #[doc = "Port n mode bits"] |
| 3846 | pub fn exti(&self, n: usize) -> u8 { | 3944 | pub fn mode(&self, n: usize) -> super::vals::Mode { |
| 3847 | assert!(n < 4usize); | 3945 | assert!(n < 8usize); |
| 3848 | let offs = 0usize + n * 4usize; | 3946 | let offs = 0usize + n * 4usize; |
| 3849 | let val = (self.0 >> offs) & 0x0f; | 3947 | let val = (self.0 >> offs) & 0x03; |
| 3850 | val as u8 | 3948 | super::vals::Mode(val as u8) |
| 3851 | } | 3949 | } |
| 3852 | #[doc = "EXTI x configuration"] | 3950 | #[doc = "Port n mode bits"] |
| 3853 | pub fn set_exti(&mut self, n: usize, val: u8) { | 3951 | pub fn set_mode(&mut self, n: usize, val: super::vals::Mode) { |
| 3854 | assert!(n < 4usize); | 3952 | assert!(n < 8usize); |
| 3855 | let offs = 0usize + n * 4usize; | 3953 | let offs = 0usize + n * 4usize; |
| 3856 | self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs); | 3954 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); |
| 3955 | } | ||
| 3956 | #[doc = "Port n configuration bits"] | ||
| 3957 | pub fn cnf(&self, n: usize) -> super::vals::Cnf { | ||
| 3958 | assert!(n < 8usize); | ||
| 3959 | let offs = 2usize + n * 4usize; | ||
| 3960 | let val = (self.0 >> offs) & 0x03; | ||
| 3961 | super::vals::Cnf(val as u8) | ||
| 3962 | } | ||
| 3963 | #[doc = "Port n configuration bits"] | ||
| 3964 | pub fn set_cnf(&mut self, n: usize, val: super::vals::Cnf) { | ||
| 3965 | assert!(n < 8usize); | ||
| 3966 | let offs = 2usize + n * 4usize; | ||
| 3967 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 3857 | } | 3968 | } |
| 3858 | } | 3969 | } |
| 3859 | impl Default for Exticr { | 3970 | impl Default for Cr { |
| 3860 | fn default() -> Exticr { | 3971 | fn default() -> Cr { |
| 3861 | Exticr(0) | 3972 | Cr(0) |
| 3862 | } | 3973 | } |
| 3863 | } | 3974 | } |
| 3864 | #[doc = "peripheral mode configuration register"] | 3975 | #[doc = "Port configuration lock register"] |
| 3865 | #[repr(transparent)] | 3976 | #[repr(transparent)] |
| 3866 | #[derive(Copy, Clone, Eq, PartialEq)] | 3977 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 3867 | pub struct Pmc(pub u32); | 3978 | pub struct Lckr(pub u32); |
| 3868 | impl Pmc { | 3979 | impl Lckr { |
| 3869 | #[doc = "ADC1DC2"] | 3980 | #[doc = "Port A Lock bit"] |
| 3870 | pub const fn adc1dc2(&self) -> bool { | 3981 | pub fn lck(&self, n: usize) -> super::vals::Lck { |
| 3871 | let val = (self.0 >> 16usize) & 0x01; | 3982 | assert!(n < 16usize); |
| 3872 | val != 0 | 3983 | let offs = 0usize + n * 1usize; |
| 3873 | } | 3984 | let val = (self.0 >> offs) & 0x01; |
| 3874 | #[doc = "ADC1DC2"] | 3985 | super::vals::Lck(val as u8) |
| 3875 | pub fn set_adc1dc2(&mut self, val: bool) { | ||
| 3876 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | ||
| 3877 | } | ||
| 3878 | #[doc = "ADC2DC2"] | ||
| 3879 | pub const fn adc2dc2(&self) -> bool { | ||
| 3880 | let val = (self.0 >> 17usize) & 0x01; | ||
| 3881 | val != 0 | ||
| 3882 | } | ||
| 3883 | #[doc = "ADC2DC2"] | ||
| 3884 | pub fn set_adc2dc2(&mut self, val: bool) { | ||
| 3885 | self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); | ||
| 3886 | } | ||
| 3887 | #[doc = "ADC3DC2"] | ||
| 3888 | pub const fn adc3dc2(&self) -> bool { | ||
| 3889 | let val = (self.0 >> 18usize) & 0x01; | ||
| 3890 | val != 0 | ||
| 3891 | } | 3986 | } |
| 3892 | #[doc = "ADC3DC2"] | 3987 | #[doc = "Port A Lock bit"] |
| 3893 | pub fn set_adc3dc2(&mut self, val: bool) { | 3988 | pub fn set_lck(&mut self, n: usize, val: super::vals::Lck) { |
| 3894 | self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); | 3989 | assert!(n < 16usize); |
| 3990 | let offs = 0usize + n * 1usize; | ||
| 3991 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 3895 | } | 3992 | } |
| 3896 | #[doc = "Ethernet PHY interface selection"] | 3993 | #[doc = "Lock key"] |
| 3897 | pub const fn mii_rmii_sel(&self) -> bool { | 3994 | pub const fn lckk(&self) -> super::vals::Lckk { |
| 3898 | let val = (self.0 >> 23usize) & 0x01; | 3995 | let val = (self.0 >> 16usize) & 0x01; |
| 3899 | val != 0 | 3996 | super::vals::Lckk(val as u8) |
| 3900 | } | 3997 | } |
| 3901 | #[doc = "Ethernet PHY interface selection"] | 3998 | #[doc = "Lock key"] |
| 3902 | pub fn set_mii_rmii_sel(&mut self, val: bool) { | 3999 | pub fn set_lckk(&mut self, val: super::vals::Lckk) { |
| 3903 | self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); | 4000 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val.0 as u32) & 0x01) << 16usize); |
| 3904 | } | 4001 | } |
| 3905 | } | 4002 | } |
| 3906 | impl Default for Pmc { | 4003 | impl Default for Lckr { |
| 3907 | fn default() -> Pmc { | 4004 | fn default() -> Lckr { |
| 3908 | Pmc(0) | 4005 | Lckr(0) |
| 3909 | } | 4006 | } |
| 3910 | } | 4007 | } |
| 3911 | } | 4008 | } |
| 4009 | pub mod vals { | ||
| 4010 | use crate::generic::*; | ||
| 4011 | #[repr(transparent)] | ||
| 4012 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4013 | pub struct Lck(pub u8); | ||
| 4014 | impl Lck { | ||
| 4015 | #[doc = "Port configuration not locked"] | ||
| 4016 | pub const UNLOCKED: Self = Self(0); | ||
| 4017 | #[doc = "Port configuration locked"] | ||
| 4018 | pub const LOCKED: Self = Self(0x01); | ||
| 4019 | } | ||
| 4020 | #[repr(transparent)] | ||
| 4021 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4022 | pub struct Idr(pub u8); | ||
| 4023 | impl Idr { | ||
| 4024 | #[doc = "Input is logic low"] | ||
| 4025 | pub const LOW: Self = Self(0); | ||
| 4026 | #[doc = "Input is logic high"] | ||
| 4027 | pub const HIGH: Self = Self(0x01); | ||
| 4028 | } | ||
| 4029 | #[repr(transparent)] | ||
| 4030 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4031 | pub struct Mode(pub u8); | ||
| 4032 | impl Mode { | ||
| 4033 | #[doc = "Input mode (reset state)"] | ||
| 4034 | pub const INPUT: Self = Self(0); | ||
| 4035 | #[doc = "Output mode 10 MHz"] | ||
| 4036 | pub const OUTPUT: Self = Self(0x01); | ||
| 4037 | #[doc = "Output mode 2 MHz"] | ||
| 4038 | pub const OUTPUT2: Self = Self(0x02); | ||
| 4039 | #[doc = "Output mode 50 MHz"] | ||
| 4040 | pub const OUTPUT50: Self = Self(0x03); | ||
| 4041 | } | ||
| 4042 | #[repr(transparent)] | ||
| 4043 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4044 | pub struct Lckk(pub u8); | ||
| 4045 | impl Lckk { | ||
| 4046 | #[doc = "Port configuration lock key not active"] | ||
| 4047 | pub const NOTACTIVE: Self = Self(0); | ||
| 4048 | #[doc = "Port configuration lock key active"] | ||
| 4049 | pub const ACTIVE: Self = Self(0x01); | ||
| 4050 | } | ||
| 4051 | #[repr(transparent)] | ||
| 4052 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4053 | pub struct Bsw(pub u8); | ||
| 4054 | impl Bsw { | ||
| 4055 | #[doc = "No action on the corresponding ODx bit"] | ||
| 4056 | pub const NOACTION: Self = Self(0); | ||
| 4057 | #[doc = "Sets the corresponding ODRx bit"] | ||
| 4058 | pub const SET: Self = Self(0x01); | ||
| 4059 | } | ||
| 4060 | #[repr(transparent)] | ||
| 4061 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4062 | pub struct Odr(pub u8); | ||
| 4063 | impl Odr { | ||
| 4064 | #[doc = "Set output to logic low"] | ||
| 4065 | pub const LOW: Self = Self(0); | ||
| 4066 | #[doc = "Set output to logic high"] | ||
| 4067 | pub const HIGH: Self = Self(0x01); | ||
| 4068 | } | ||
| 4069 | #[repr(transparent)] | ||
| 4070 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4071 | pub struct Brw(pub u8); | ||
| 4072 | impl Brw { | ||
| 4073 | #[doc = "No action on the corresponding ODx bit"] | ||
| 4074 | pub const NOACTION: Self = Self(0); | ||
| 4075 | #[doc = "Reset the ODx bit"] | ||
| 4076 | pub const RESET: Self = Self(0x01); | ||
| 4077 | } | ||
| 4078 | #[repr(transparent)] | ||
| 4079 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4080 | pub struct Cnf(pub u8); | ||
| 4081 | impl Cnf { | ||
| 4082 | #[doc = "Analog mode / Push-Pull mode"] | ||
| 4083 | pub const PUSHPULL: Self = Self(0); | ||
| 4084 | #[doc = "Floating input (reset state) / Open Drain-Mode"] | ||
| 4085 | pub const OPENDRAIN: Self = Self(0x01); | ||
| 4086 | #[doc = "Input with pull-up/pull-down / Alternate Function Push-Pull Mode"] | ||
| 4087 | pub const ALTPUSHPULL: Self = Self(0x02); | ||
| 4088 | #[doc = "Alternate Function Open-Drain Mode"] | ||
| 4089 | pub const ALTOPENDRAIN: Self = Self(0x03); | ||
| 4090 | } | ||
| 4091 | } | ||
| 3912 | } | 4092 | } |
| 3913 | pub mod usart_v1 { | 4093 | pub mod usart_v1 { |
| 3914 | use crate::generic::*; | 4094 | use crate::generic::*; |
| @@ -3978,199 +4158,8 @@ pub mod usart_v1 { | |||
| 3978 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | 4158 | unsafe { Reg::from_ptr(self.0.add(20usize)) } |
| 3979 | } | 4159 | } |
| 3980 | } | 4160 | } |
| 3981 | pub mod vals { | ||
| 3982 | use crate::generic::*; | ||
| 3983 | #[repr(transparent)] | ||
| 3984 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3985 | pub struct Lbdl(pub u8); | ||
| 3986 | impl Lbdl { | ||
| 3987 | #[doc = "10-bit break detection"] | ||
| 3988 | pub const LBDL10: Self = Self(0); | ||
| 3989 | #[doc = "11-bit break detection"] | ||
| 3990 | pub const LBDL11: Self = Self(0x01); | ||
| 3991 | } | ||
| 3992 | #[repr(transparent)] | ||
| 3993 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3994 | pub struct Rwu(pub u8); | ||
| 3995 | impl Rwu { | ||
| 3996 | #[doc = "Receiver in active mode"] | ||
| 3997 | pub const ACTIVE: Self = Self(0); | ||
| 3998 | #[doc = "Receiver in mute mode"] | ||
| 3999 | pub const MUTE: Self = Self(0x01); | ||
| 4000 | } | ||
| 4001 | #[repr(transparent)] | ||
| 4002 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4003 | pub struct Cpha(pub u8); | ||
| 4004 | impl Cpha { | ||
| 4005 | #[doc = "The first clock transition is the first data capture edge"] | ||
| 4006 | pub const FIRST: Self = Self(0); | ||
| 4007 | #[doc = "The second clock transition is the first data capture edge"] | ||
| 4008 | pub const SECOND: Self = Self(0x01); | ||
| 4009 | } | ||
| 4010 | #[repr(transparent)] | ||
| 4011 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4012 | pub struct Ps(pub u8); | ||
| 4013 | impl Ps { | ||
| 4014 | #[doc = "Even parity"] | ||
| 4015 | pub const EVEN: Self = Self(0); | ||
| 4016 | #[doc = "Odd parity"] | ||
| 4017 | pub const ODD: Self = Self(0x01); | ||
| 4018 | } | ||
| 4019 | #[repr(transparent)] | ||
| 4020 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4021 | pub struct Stop(pub u8); | ||
| 4022 | impl Stop { | ||
| 4023 | #[doc = "1 stop bit"] | ||
| 4024 | pub const STOP1: Self = Self(0); | ||
| 4025 | #[doc = "0.5 stop bits"] | ||
| 4026 | pub const STOP0P5: Self = Self(0x01); | ||
| 4027 | #[doc = "2 stop bits"] | ||
| 4028 | pub const STOP2: Self = Self(0x02); | ||
| 4029 | #[doc = "1.5 stop bits"] | ||
| 4030 | pub const STOP1P5: Self = Self(0x03); | ||
| 4031 | } | ||
| 4032 | #[repr(transparent)] | ||
| 4033 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4034 | pub struct Wake(pub u8); | ||
| 4035 | impl Wake { | ||
| 4036 | #[doc = "USART wakeup on idle line"] | ||
| 4037 | pub const IDLELINE: Self = Self(0); | ||
| 4038 | #[doc = "USART wakeup on address mark"] | ||
| 4039 | pub const ADDRESSMARK: Self = Self(0x01); | ||
| 4040 | } | ||
| 4041 | #[repr(transparent)] | ||
| 4042 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4043 | pub struct Hdsel(pub u8); | ||
| 4044 | impl Hdsel { | ||
| 4045 | #[doc = "Half duplex mode is not selected"] | ||
| 4046 | pub const FULLDUPLEX: Self = Self(0); | ||
| 4047 | #[doc = "Half duplex mode is selected"] | ||
| 4048 | pub const HALFDUPLEX: Self = Self(0x01); | ||
| 4049 | } | ||
| 4050 | #[repr(transparent)] | ||
| 4051 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4052 | pub struct Irlp(pub u8); | ||
| 4053 | impl Irlp { | ||
| 4054 | #[doc = "Normal mode"] | ||
| 4055 | pub const NORMAL: Self = Self(0); | ||
| 4056 | #[doc = "Low-power mode"] | ||
| 4057 | pub const LOWPOWER: Self = Self(0x01); | ||
| 4058 | } | ||
| 4059 | #[repr(transparent)] | ||
| 4060 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4061 | pub struct Cpol(pub u8); | ||
| 4062 | impl Cpol { | ||
| 4063 | #[doc = "Steady low value on CK pin outside transmission window"] | ||
| 4064 | pub const LOW: Self = Self(0); | ||
| 4065 | #[doc = "Steady high value on CK pin outside transmission window"] | ||
| 4066 | pub const HIGH: Self = Self(0x01); | ||
| 4067 | } | ||
| 4068 | #[repr(transparent)] | ||
| 4069 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4070 | pub struct M(pub u8); | ||
| 4071 | impl M { | ||
| 4072 | #[doc = "8 data bits"] | ||
| 4073 | pub const M8: Self = Self(0); | ||
| 4074 | #[doc = "9 data bits"] | ||
| 4075 | pub const M9: Self = Self(0x01); | ||
| 4076 | } | ||
| 4077 | #[repr(transparent)] | ||
| 4078 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4079 | pub struct Sbk(pub u8); | ||
| 4080 | impl Sbk { | ||
| 4081 | #[doc = "No break character is transmitted"] | ||
| 4082 | pub const NOBREAK: Self = Self(0); | ||
| 4083 | #[doc = "Break character transmitted"] | ||
| 4084 | pub const BREAK: Self = Self(0x01); | ||
| 4085 | } | ||
| 4086 | } | ||
| 4087 | pub mod regs { | 4161 | pub mod regs { |
| 4088 | use crate::generic::*; | 4162 | use crate::generic::*; |
| 4089 | #[doc = "Control register 3"] | ||
| 4090 | #[repr(transparent)] | ||
| 4091 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 4092 | pub struct Cr3(pub u32); | ||
| 4093 | impl Cr3 { | ||
| 4094 | #[doc = "Error interrupt enable"] | ||
| 4095 | pub const fn eie(&self) -> bool { | ||
| 4096 | let val = (self.0 >> 0usize) & 0x01; | ||
| 4097 | val != 0 | ||
| 4098 | } | ||
| 4099 | #[doc = "Error interrupt enable"] | ||
| 4100 | pub fn set_eie(&mut self, val: bool) { | ||
| 4101 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 4102 | } | ||
| 4103 | #[doc = "IrDA mode enable"] | ||
| 4104 | pub const fn iren(&self) -> bool { | ||
| 4105 | let val = (self.0 >> 1usize) & 0x01; | ||
| 4106 | val != 0 | ||
| 4107 | } | ||
| 4108 | #[doc = "IrDA mode enable"] | ||
| 4109 | pub fn set_iren(&mut self, val: bool) { | ||
| 4110 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 4111 | } | ||
| 4112 | #[doc = "IrDA low-power"] | ||
| 4113 | pub const fn irlp(&self) -> super::vals::Irlp { | ||
| 4114 | let val = (self.0 >> 2usize) & 0x01; | ||
| 4115 | super::vals::Irlp(val as u8) | ||
| 4116 | } | ||
| 4117 | #[doc = "IrDA low-power"] | ||
| 4118 | pub fn set_irlp(&mut self, val: super::vals::Irlp) { | ||
| 4119 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); | ||
| 4120 | } | ||
| 4121 | #[doc = "Half-duplex selection"] | ||
| 4122 | pub const fn hdsel(&self) -> super::vals::Hdsel { | ||
| 4123 | let val = (self.0 >> 3usize) & 0x01; | ||
| 4124 | super::vals::Hdsel(val as u8) | ||
| 4125 | } | ||
| 4126 | #[doc = "Half-duplex selection"] | ||
| 4127 | pub fn set_hdsel(&mut self, val: super::vals::Hdsel) { | ||
| 4128 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); | ||
| 4129 | } | ||
| 4130 | #[doc = "DMA enable receiver"] | ||
| 4131 | pub const fn dmar(&self) -> bool { | ||
| 4132 | let val = (self.0 >> 6usize) & 0x01; | ||
| 4133 | val != 0 | ||
| 4134 | } | ||
| 4135 | #[doc = "DMA enable receiver"] | ||
| 4136 | pub fn set_dmar(&mut self, val: bool) { | ||
| 4137 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | ||
| 4138 | } | ||
| 4139 | #[doc = "DMA enable transmitter"] | ||
| 4140 | pub const fn dmat(&self) -> bool { | ||
| 4141 | let val = (self.0 >> 7usize) & 0x01; | ||
| 4142 | val != 0 | ||
| 4143 | } | ||
| 4144 | #[doc = "DMA enable transmitter"] | ||
| 4145 | pub fn set_dmat(&mut self, val: bool) { | ||
| 4146 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 4147 | } | ||
| 4148 | } | ||
| 4149 | impl Default for Cr3 { | ||
| 4150 | fn default() -> Cr3 { | ||
| 4151 | Cr3(0) | ||
| 4152 | } | ||
| 4153 | } | ||
| 4154 | #[doc = "Data register"] | ||
| 4155 | #[repr(transparent)] | ||
| 4156 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 4157 | pub struct Dr(pub u32); | ||
| 4158 | impl Dr { | ||
| 4159 | #[doc = "Data value"] | ||
| 4160 | pub const fn dr(&self) -> u16 { | ||
| 4161 | let val = (self.0 >> 0usize) & 0x01ff; | ||
| 4162 | val as u16 | ||
| 4163 | } | ||
| 4164 | #[doc = "Data value"] | ||
| 4165 | pub fn set_dr(&mut self, val: u16) { | ||
| 4166 | self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize); | ||
| 4167 | } | ||
| 4168 | } | ||
| 4169 | impl Default for Dr { | ||
| 4170 | fn default() -> Dr { | ||
| 4171 | Dr(0) | ||
| 4172 | } | ||
| 4173 | } | ||
| 4174 | #[doc = "Status register"] | 4163 | #[doc = "Status register"] |
| 4175 | #[repr(transparent)] | 4164 | #[repr(transparent)] |
| 4176 | #[derive(Copy, Clone, Eq, PartialEq)] | 4165 | #[derive(Copy, Clone, Eq, PartialEq)] |
| @@ -4272,11 +4261,31 @@ pub mod usart_v1 { | |||
| 4272 | SrUsart(0) | 4261 | SrUsart(0) |
| 4273 | } | 4262 | } |
| 4274 | } | 4263 | } |
| 4264 | #[doc = "Data register"] | ||
| 4265 | #[repr(transparent)] | ||
| 4266 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 4267 | pub struct Dr(pub u32); | ||
| 4268 | impl Dr { | ||
| 4269 | #[doc = "Data value"] | ||
| 4270 | pub const fn dr(&self) -> u16 { | ||
| 4271 | let val = (self.0 >> 0usize) & 0x01ff; | ||
| 4272 | val as u16 | ||
| 4273 | } | ||
| 4274 | #[doc = "Data value"] | ||
| 4275 | pub fn set_dr(&mut self, val: u16) { | ||
| 4276 | self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize); | ||
| 4277 | } | ||
| 4278 | } | ||
| 4279 | impl Default for Dr { | ||
| 4280 | fn default() -> Dr { | ||
| 4281 | Dr(0) | ||
| 4282 | } | ||
| 4283 | } | ||
| 4275 | #[doc = "Control register 3"] | 4284 | #[doc = "Control register 3"] |
| 4276 | #[repr(transparent)] | 4285 | #[repr(transparent)] |
| 4277 | #[derive(Copy, Clone, Eq, PartialEq)] | 4286 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 4278 | pub struct Cr3Usart(pub u32); | 4287 | pub struct Cr3(pub u32); |
| 4279 | impl Cr3Usart { | 4288 | impl Cr3 { |
| 4280 | #[doc = "Error interrupt enable"] | 4289 | #[doc = "Error interrupt enable"] |
| 4281 | pub const fn eie(&self) -> bool { | 4290 | pub const fn eie(&self) -> bool { |
| 4282 | let val = (self.0 >> 0usize) & 0x01; | 4291 | let val = (self.0 >> 0usize) & 0x01; |
| @@ -4313,24 +4322,6 @@ pub mod usart_v1 { | |||
| 4313 | pub fn set_hdsel(&mut self, val: super::vals::Hdsel) { | 4322 | pub fn set_hdsel(&mut self, val: super::vals::Hdsel) { |
| 4314 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); | 4323 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); |
| 4315 | } | 4324 | } |
| 4316 | #[doc = "Smartcard NACK enable"] | ||
| 4317 | pub const fn nack(&self) -> bool { | ||
| 4318 | let val = (self.0 >> 4usize) & 0x01; | ||
| 4319 | val != 0 | ||
| 4320 | } | ||
| 4321 | #[doc = "Smartcard NACK enable"] | ||
| 4322 | pub fn set_nack(&mut self, val: bool) { | ||
| 4323 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | ||
| 4324 | } | ||
| 4325 | #[doc = "Smartcard mode enable"] | ||
| 4326 | pub const fn scen(&self) -> bool { | ||
| 4327 | let val = (self.0 >> 5usize) & 0x01; | ||
| 4328 | val != 0 | ||
| 4329 | } | ||
| 4330 | #[doc = "Smartcard mode enable"] | ||
| 4331 | pub fn set_scen(&mut self, val: bool) { | ||
| 4332 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | ||
| 4333 | } | ||
| 4334 | #[doc = "DMA enable receiver"] | 4325 | #[doc = "DMA enable receiver"] |
| 4335 | pub const fn dmar(&self) -> bool { | 4326 | pub const fn dmar(&self) -> bool { |
| 4336 | let val = (self.0 >> 6usize) & 0x01; | 4327 | let val = (self.0 >> 6usize) & 0x01; |
| @@ -4349,37 +4340,131 @@ pub mod usart_v1 { | |||
| 4349 | pub fn set_dmat(&mut self, val: bool) { | 4340 | pub fn set_dmat(&mut self, val: bool) { |
| 4350 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | 4341 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); |
| 4351 | } | 4342 | } |
| 4352 | #[doc = "RTS enable"] | 4343 | } |
| 4353 | pub const fn rtse(&self) -> bool { | 4344 | impl Default for Cr3 { |
| 4345 | fn default() -> Cr3 { | ||
| 4346 | Cr3(0) | ||
| 4347 | } | ||
| 4348 | } | ||
| 4349 | #[doc = "Guard time and prescaler register"] | ||
| 4350 | #[repr(transparent)] | ||
| 4351 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 4352 | pub struct Gtpr(pub u32); | ||
| 4353 | impl Gtpr { | ||
| 4354 | #[doc = "Prescaler value"] | ||
| 4355 | pub const fn psc(&self) -> u8 { | ||
| 4356 | let val = (self.0 >> 0usize) & 0xff; | ||
| 4357 | val as u8 | ||
| 4358 | } | ||
| 4359 | #[doc = "Prescaler value"] | ||
| 4360 | pub fn set_psc(&mut self, val: u8) { | ||
| 4361 | self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); | ||
| 4362 | } | ||
| 4363 | #[doc = "Guard time value"] | ||
| 4364 | pub const fn gt(&self) -> u8 { | ||
| 4365 | let val = (self.0 >> 8usize) & 0xff; | ||
| 4366 | val as u8 | ||
| 4367 | } | ||
| 4368 | #[doc = "Guard time value"] | ||
| 4369 | pub fn set_gt(&mut self, val: u8) { | ||
| 4370 | self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); | ||
| 4371 | } | ||
| 4372 | } | ||
| 4373 | impl Default for Gtpr { | ||
| 4374 | fn default() -> Gtpr { | ||
| 4375 | Gtpr(0) | ||
| 4376 | } | ||
| 4377 | } | ||
| 4378 | #[doc = "Control register 2"] | ||
| 4379 | #[repr(transparent)] | ||
| 4380 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 4381 | pub struct Cr2Usart(pub u32); | ||
| 4382 | impl Cr2Usart { | ||
| 4383 | #[doc = "Address of the USART node"] | ||
| 4384 | pub const fn add(&self) -> u8 { | ||
| 4385 | let val = (self.0 >> 0usize) & 0x0f; | ||
| 4386 | val as u8 | ||
| 4387 | } | ||
| 4388 | #[doc = "Address of the USART node"] | ||
| 4389 | pub fn set_add(&mut self, val: u8) { | ||
| 4390 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); | ||
| 4391 | } | ||
| 4392 | #[doc = "lin break detection length"] | ||
| 4393 | pub const fn lbdl(&self) -> super::vals::Lbdl { | ||
| 4394 | let val = (self.0 >> 5usize) & 0x01; | ||
| 4395 | super::vals::Lbdl(val as u8) | ||
| 4396 | } | ||
| 4397 | #[doc = "lin break detection length"] | ||
| 4398 | pub fn set_lbdl(&mut self, val: super::vals::Lbdl) { | ||
| 4399 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize); | ||
| 4400 | } | ||
| 4401 | #[doc = "LIN break detection interrupt enable"] | ||
| 4402 | pub const fn lbdie(&self) -> bool { | ||
| 4403 | let val = (self.0 >> 6usize) & 0x01; | ||
| 4404 | val != 0 | ||
| 4405 | } | ||
| 4406 | #[doc = "LIN break detection interrupt enable"] | ||
| 4407 | pub fn set_lbdie(&mut self, val: bool) { | ||
| 4408 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | ||
| 4409 | } | ||
| 4410 | #[doc = "Last bit clock pulse"] | ||
| 4411 | pub const fn lbcl(&self) -> bool { | ||
| 4354 | let val = (self.0 >> 8usize) & 0x01; | 4412 | let val = (self.0 >> 8usize) & 0x01; |
| 4355 | val != 0 | 4413 | val != 0 |
| 4356 | } | 4414 | } |
| 4357 | #[doc = "RTS enable"] | 4415 | #[doc = "Last bit clock pulse"] |
| 4358 | pub fn set_rtse(&mut self, val: bool) { | 4416 | pub fn set_lbcl(&mut self, val: bool) { |
| 4359 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 4417 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 4360 | } | 4418 | } |
| 4361 | #[doc = "CTS enable"] | 4419 | #[doc = "Clock phase"] |
| 4362 | pub const fn ctse(&self) -> bool { | 4420 | pub const fn cpha(&self) -> super::vals::Cpha { |
| 4363 | let val = (self.0 >> 9usize) & 0x01; | 4421 | let val = (self.0 >> 9usize) & 0x01; |
| 4364 | val != 0 | 4422 | super::vals::Cpha(val as u8) |
| 4365 | } | 4423 | } |
| 4366 | #[doc = "CTS enable"] | 4424 | #[doc = "Clock phase"] |
| 4367 | pub fn set_ctse(&mut self, val: bool) { | 4425 | pub fn set_cpha(&mut self, val: super::vals::Cpha) { |
| 4368 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); | 4426 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize); |
| 4369 | } | 4427 | } |
| 4370 | #[doc = "CTS interrupt enable"] | 4428 | #[doc = "Clock polarity"] |
| 4371 | pub const fn ctsie(&self) -> bool { | 4429 | pub const fn cpol(&self) -> super::vals::Cpol { |
| 4372 | let val = (self.0 >> 10usize) & 0x01; | 4430 | let val = (self.0 >> 10usize) & 0x01; |
| 4431 | super::vals::Cpol(val as u8) | ||
| 4432 | } | ||
| 4433 | #[doc = "Clock polarity"] | ||
| 4434 | pub fn set_cpol(&mut self, val: super::vals::Cpol) { | ||
| 4435 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); | ||
| 4436 | } | ||
| 4437 | #[doc = "Clock enable"] | ||
| 4438 | pub const fn clken(&self) -> bool { | ||
| 4439 | let val = (self.0 >> 11usize) & 0x01; | ||
| 4373 | val != 0 | 4440 | val != 0 |
| 4374 | } | 4441 | } |
| 4375 | #[doc = "CTS interrupt enable"] | 4442 | #[doc = "Clock enable"] |
| 4376 | pub fn set_ctsie(&mut self, val: bool) { | 4443 | pub fn set_clken(&mut self, val: bool) { |
| 4377 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); | 4444 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); |
| 4445 | } | ||
| 4446 | #[doc = "STOP bits"] | ||
| 4447 | pub const fn stop(&self) -> super::vals::Stop { | ||
| 4448 | let val = (self.0 >> 12usize) & 0x03; | ||
| 4449 | super::vals::Stop(val as u8) | ||
| 4450 | } | ||
| 4451 | #[doc = "STOP bits"] | ||
| 4452 | pub fn set_stop(&mut self, val: super::vals::Stop) { | ||
| 4453 | self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize); | ||
| 4454 | } | ||
| 4455 | #[doc = "LIN mode enable"] | ||
| 4456 | pub const fn linen(&self) -> bool { | ||
| 4457 | let val = (self.0 >> 14usize) & 0x01; | ||
| 4458 | val != 0 | ||
| 4459 | } | ||
| 4460 | #[doc = "LIN mode enable"] | ||
| 4461 | pub fn set_linen(&mut self, val: bool) { | ||
| 4462 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); | ||
| 4378 | } | 4463 | } |
| 4379 | } | 4464 | } |
| 4380 | impl Default for Cr3Usart { | 4465 | impl Default for Cr2Usart { |
| 4381 | fn default() -> Cr3Usart { | 4466 | fn default() -> Cr2Usart { |
| 4382 | Cr3Usart(0) | 4467 | Cr2Usart(0) |
| 4383 | } | 4468 | } |
| 4384 | } | 4469 | } |
| 4385 | #[doc = "Control register 2"] | 4470 | #[doc = "Control register 2"] |
| @@ -4559,125 +4644,114 @@ pub mod usart_v1 { | |||
| 4559 | Brr(0) | 4644 | Brr(0) |
| 4560 | } | 4645 | } |
| 4561 | } | 4646 | } |
| 4562 | #[doc = "Control register 2"] | 4647 | #[doc = "Control register 3"] |
| 4563 | #[repr(transparent)] | 4648 | #[repr(transparent)] |
| 4564 | #[derive(Copy, Clone, Eq, PartialEq)] | 4649 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 4565 | pub struct Cr2Usart(pub u32); | 4650 | pub struct Cr3Usart(pub u32); |
| 4566 | impl Cr2Usart { | 4651 | impl Cr3Usart { |
| 4567 | #[doc = "Address of the USART node"] | 4652 | #[doc = "Error interrupt enable"] |
| 4568 | pub const fn add(&self) -> u8 { | 4653 | pub const fn eie(&self) -> bool { |
| 4569 | let val = (self.0 >> 0usize) & 0x0f; | 4654 | let val = (self.0 >> 0usize) & 0x01; |
| 4570 | val as u8 | 4655 | val != 0 |
| 4571 | } | ||
| 4572 | #[doc = "Address of the USART node"] | ||
| 4573 | pub fn set_add(&mut self, val: u8) { | ||
| 4574 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); | ||
| 4575 | } | ||
| 4576 | #[doc = "lin break detection length"] | ||
| 4577 | pub const fn lbdl(&self) -> super::vals::Lbdl { | ||
| 4578 | let val = (self.0 >> 5usize) & 0x01; | ||
| 4579 | super::vals::Lbdl(val as u8) | ||
| 4580 | } | 4656 | } |
| 4581 | #[doc = "lin break detection length"] | 4657 | #[doc = "Error interrupt enable"] |
| 4582 | pub fn set_lbdl(&mut self, val: super::vals::Lbdl) { | 4658 | pub fn set_eie(&mut self, val: bool) { |
| 4583 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize); | 4659 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 4584 | } | 4660 | } |
| 4585 | #[doc = "LIN break detection interrupt enable"] | 4661 | #[doc = "IrDA mode enable"] |
| 4586 | pub const fn lbdie(&self) -> bool { | 4662 | pub const fn iren(&self) -> bool { |
| 4587 | let val = (self.0 >> 6usize) & 0x01; | 4663 | let val = (self.0 >> 1usize) & 0x01; |
| 4588 | val != 0 | 4664 | val != 0 |
| 4589 | } | 4665 | } |
| 4590 | #[doc = "LIN break detection interrupt enable"] | 4666 | #[doc = "IrDA mode enable"] |
| 4591 | pub fn set_lbdie(&mut self, val: bool) { | 4667 | pub fn set_iren(&mut self, val: bool) { |
| 4592 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 4668 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 4593 | } | 4669 | } |
| 4594 | #[doc = "Last bit clock pulse"] | 4670 | #[doc = "IrDA low-power"] |
| 4595 | pub const fn lbcl(&self) -> bool { | 4671 | pub const fn irlp(&self) -> super::vals::Irlp { |
| 4596 | let val = (self.0 >> 8usize) & 0x01; | 4672 | let val = (self.0 >> 2usize) & 0x01; |
| 4597 | val != 0 | 4673 | super::vals::Irlp(val as u8) |
| 4598 | } | 4674 | } |
| 4599 | #[doc = "Last bit clock pulse"] | 4675 | #[doc = "IrDA low-power"] |
| 4600 | pub fn set_lbcl(&mut self, val: bool) { | 4676 | pub fn set_irlp(&mut self, val: super::vals::Irlp) { |
| 4601 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 4677 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); |
| 4602 | } | 4678 | } |
| 4603 | #[doc = "Clock phase"] | 4679 | #[doc = "Half-duplex selection"] |
| 4604 | pub const fn cpha(&self) -> super::vals::Cpha { | 4680 | pub const fn hdsel(&self) -> super::vals::Hdsel { |
| 4605 | let val = (self.0 >> 9usize) & 0x01; | 4681 | let val = (self.0 >> 3usize) & 0x01; |
| 4606 | super::vals::Cpha(val as u8) | 4682 | super::vals::Hdsel(val as u8) |
| 4607 | } | 4683 | } |
| 4608 | #[doc = "Clock phase"] | 4684 | #[doc = "Half-duplex selection"] |
| 4609 | pub fn set_cpha(&mut self, val: super::vals::Cpha) { | 4685 | pub fn set_hdsel(&mut self, val: super::vals::Hdsel) { |
| 4610 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize); | 4686 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); |
| 4611 | } | 4687 | } |
| 4612 | #[doc = "Clock polarity"] | 4688 | #[doc = "Smartcard NACK enable"] |
| 4613 | pub const fn cpol(&self) -> super::vals::Cpol { | 4689 | pub const fn nack(&self) -> bool { |
| 4614 | let val = (self.0 >> 10usize) & 0x01; | 4690 | let val = (self.0 >> 4usize) & 0x01; |
| 4615 | super::vals::Cpol(val as u8) | 4691 | val != 0 |
| 4616 | } | 4692 | } |
| 4617 | #[doc = "Clock polarity"] | 4693 | #[doc = "Smartcard NACK enable"] |
| 4618 | pub fn set_cpol(&mut self, val: super::vals::Cpol) { | 4694 | pub fn set_nack(&mut self, val: bool) { |
| 4619 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); | 4695 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); |
| 4620 | } | 4696 | } |
| 4621 | #[doc = "Clock enable"] | 4697 | #[doc = "Smartcard mode enable"] |
| 4622 | pub const fn clken(&self) -> bool { | 4698 | pub const fn scen(&self) -> bool { |
| 4623 | let val = (self.0 >> 11usize) & 0x01; | 4699 | let val = (self.0 >> 5usize) & 0x01; |
| 4624 | val != 0 | 4700 | val != 0 |
| 4625 | } | 4701 | } |
| 4626 | #[doc = "Clock enable"] | 4702 | #[doc = "Smartcard mode enable"] |
| 4627 | pub fn set_clken(&mut self, val: bool) { | 4703 | pub fn set_scen(&mut self, val: bool) { |
| 4628 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); | 4704 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); |
| 4629 | } | 4705 | } |
| 4630 | #[doc = "STOP bits"] | 4706 | #[doc = "DMA enable receiver"] |
| 4631 | pub const fn stop(&self) -> super::vals::Stop { | 4707 | pub const fn dmar(&self) -> bool { |
| 4632 | let val = (self.0 >> 12usize) & 0x03; | 4708 | let val = (self.0 >> 6usize) & 0x01; |
| 4633 | super::vals::Stop(val as u8) | 4709 | val != 0 |
| 4634 | } | 4710 | } |
| 4635 | #[doc = "STOP bits"] | 4711 | #[doc = "DMA enable receiver"] |
| 4636 | pub fn set_stop(&mut self, val: super::vals::Stop) { | 4712 | pub fn set_dmar(&mut self, val: bool) { |
| 4637 | self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize); | 4713 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 4638 | } | 4714 | } |
| 4639 | #[doc = "LIN mode enable"] | 4715 | #[doc = "DMA enable transmitter"] |
| 4640 | pub const fn linen(&self) -> bool { | 4716 | pub const fn dmat(&self) -> bool { |
| 4641 | let val = (self.0 >> 14usize) & 0x01; | 4717 | let val = (self.0 >> 7usize) & 0x01; |
| 4642 | val != 0 | 4718 | val != 0 |
| 4643 | } | 4719 | } |
| 4644 | #[doc = "LIN mode enable"] | 4720 | #[doc = "DMA enable transmitter"] |
| 4645 | pub fn set_linen(&mut self, val: bool) { | 4721 | pub fn set_dmat(&mut self, val: bool) { |
| 4646 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); | 4722 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); |
| 4647 | } | 4723 | } |
| 4648 | } | 4724 | #[doc = "RTS enable"] |
| 4649 | impl Default for Cr2Usart { | 4725 | pub const fn rtse(&self) -> bool { |
| 4650 | fn default() -> Cr2Usart { | 4726 | let val = (self.0 >> 8usize) & 0x01; |
| 4651 | Cr2Usart(0) | 4727 | val != 0 |
| 4652 | } | 4728 | } |
| 4653 | } | 4729 | #[doc = "RTS enable"] |
| 4654 | #[doc = "Guard time and prescaler register"] | 4730 | pub fn set_rtse(&mut self, val: bool) { |
| 4655 | #[repr(transparent)] | 4731 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 4656 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 4657 | pub struct Gtpr(pub u32); | ||
| 4658 | impl Gtpr { | ||
| 4659 | #[doc = "Prescaler value"] | ||
| 4660 | pub const fn psc(&self) -> u8 { | ||
| 4661 | let val = (self.0 >> 0usize) & 0xff; | ||
| 4662 | val as u8 | ||
| 4663 | } | 4732 | } |
| 4664 | #[doc = "Prescaler value"] | 4733 | #[doc = "CTS enable"] |
| 4665 | pub fn set_psc(&mut self, val: u8) { | 4734 | pub const fn ctse(&self) -> bool { |
| 4666 | self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); | 4735 | let val = (self.0 >> 9usize) & 0x01; |
| 4736 | val != 0 | ||
| 4667 | } | 4737 | } |
| 4668 | #[doc = "Guard time value"] | 4738 | #[doc = "CTS enable"] |
| 4669 | pub const fn gt(&self) -> u8 { | 4739 | pub fn set_ctse(&mut self, val: bool) { |
| 4670 | let val = (self.0 >> 8usize) & 0xff; | 4740 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); |
| 4671 | val as u8 | ||
| 4672 | } | 4741 | } |
| 4673 | #[doc = "Guard time value"] | 4742 | #[doc = "CTS interrupt enable"] |
| 4674 | pub fn set_gt(&mut self, val: u8) { | 4743 | pub const fn ctsie(&self) -> bool { |
| 4675 | self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); | 4744 | let val = (self.0 >> 10usize) & 0x01; |
| 4745 | val != 0 | ||
| 4746 | } | ||
| 4747 | #[doc = "CTS interrupt enable"] | ||
| 4748 | pub fn set_ctsie(&mut self, val: bool) { | ||
| 4749 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); | ||
| 4676 | } | 4750 | } |
| 4677 | } | 4751 | } |
| 4678 | impl Default for Gtpr { | 4752 | impl Default for Cr3Usart { |
| 4679 | fn default() -> Gtpr { | 4753 | fn default() -> Cr3Usart { |
| 4680 | Gtpr(0) | 4754 | Cr3Usart(0) |
| 4681 | } | 4755 | } |
| 4682 | } | 4756 | } |
| 4683 | #[doc = "Control register 1"] | 4757 | #[doc = "Control register 1"] |
| @@ -4818,698 +4892,400 @@ pub mod usart_v1 { | |||
| 4818 | } | 4892 | } |
| 4819 | } | 4893 | } |
| 4820 | } | 4894 | } |
| 4821 | } | 4895 | pub mod vals { |
| 4822 | pub mod syscfg_l4 { | ||
| 4823 | use crate::generic::*; | ||
| 4824 | #[doc = "System configuration controller"] | ||
| 4825 | #[derive(Copy, Clone)] | ||
| 4826 | pub struct Syscfg(pub *mut u8); | ||
| 4827 | unsafe impl Send for Syscfg {} | ||
| 4828 | unsafe impl Sync for Syscfg {} | ||
| 4829 | impl Syscfg { | ||
| 4830 | #[doc = "memory remap register"] | ||
| 4831 | pub fn memrmp(self) -> Reg<regs::Memrmp, RW> { | ||
| 4832 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 4833 | } | ||
| 4834 | #[doc = "configuration register 1"] | ||
| 4835 | pub fn cfgr1(self) -> Reg<regs::Cfgr1, RW> { | ||
| 4836 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 4837 | } | ||
| 4838 | #[doc = "external interrupt configuration register 1"] | ||
| 4839 | pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> { | ||
| 4840 | assert!(n < 4usize); | ||
| 4841 | unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) } | ||
| 4842 | } | ||
| 4843 | #[doc = "SCSR"] | ||
| 4844 | pub fn scsr(self) -> Reg<regs::Scsr, RW> { | ||
| 4845 | unsafe { Reg::from_ptr(self.0.add(24usize)) } | ||
| 4846 | } | ||
| 4847 | #[doc = "CFGR2"] | ||
| 4848 | pub fn cfgr2(self) -> Reg<regs::Cfgr2, RW> { | ||
| 4849 | unsafe { Reg::from_ptr(self.0.add(28usize)) } | ||
| 4850 | } | ||
| 4851 | #[doc = "SWPR"] | ||
| 4852 | pub fn swpr(self) -> Reg<regs::Swpr, W> { | ||
| 4853 | unsafe { Reg::from_ptr(self.0.add(32usize)) } | ||
| 4854 | } | ||
| 4855 | #[doc = "SKR"] | ||
| 4856 | pub fn skr(self) -> Reg<regs::Skr, W> { | ||
| 4857 | unsafe { Reg::from_ptr(self.0.add(36usize)) } | ||
| 4858 | } | ||
| 4859 | } | ||
| 4860 | pub mod regs { | ||
| 4861 | use crate::generic::*; | 4896 | use crate::generic::*; |
| 4862 | #[doc = "configuration register 1"] | ||
| 4863 | #[repr(transparent)] | 4897 | #[repr(transparent)] |
| 4864 | #[derive(Copy, Clone, Eq, PartialEq)] | 4898 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 4865 | pub struct Cfgr1(pub u32); | 4899 | pub struct Wake(pub u8); |
| 4866 | impl Cfgr1 { | 4900 | impl Wake { |
| 4867 | #[doc = "Firewall disable"] | 4901 | #[doc = "USART wakeup on idle line"] |
| 4868 | pub const fn fwdis(&self) -> bool { | 4902 | pub const IDLELINE: Self = Self(0); |
| 4869 | let val = (self.0 >> 0usize) & 0x01; | 4903 | #[doc = "USART wakeup on address mark"] |
| 4870 | val != 0 | 4904 | pub const ADDRESSMARK: Self = Self(0x01); |
| 4871 | } | ||
| 4872 | #[doc = "Firewall disable"] | ||
| 4873 | pub fn set_fwdis(&mut self, val: bool) { | ||
| 4874 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 4875 | } | ||
| 4876 | #[doc = "I/O analog switch voltage booster enable"] | ||
| 4877 | pub const fn boosten(&self) -> bool { | ||
| 4878 | let val = (self.0 >> 8usize) & 0x01; | ||
| 4879 | val != 0 | ||
| 4880 | } | ||
| 4881 | #[doc = "I/O analog switch voltage booster enable"] | ||
| 4882 | pub fn set_boosten(&mut self, val: bool) { | ||
| 4883 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | ||
| 4884 | } | ||
| 4885 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"] | ||
| 4886 | pub const fn i2c_pb6_fmp(&self) -> bool { | ||
| 4887 | let val = (self.0 >> 16usize) & 0x01; | ||
| 4888 | val != 0 | ||
| 4889 | } | ||
| 4890 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"] | ||
| 4891 | pub fn set_i2c_pb6_fmp(&mut self, val: bool) { | ||
| 4892 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | ||
| 4893 | } | ||
| 4894 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"] | ||
| 4895 | pub const fn i2c_pb7_fmp(&self) -> bool { | ||
| 4896 | let val = (self.0 >> 17usize) & 0x01; | ||
| 4897 | val != 0 | ||
| 4898 | } | ||
| 4899 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"] | ||
| 4900 | pub fn set_i2c_pb7_fmp(&mut self, val: bool) { | ||
| 4901 | self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); | ||
| 4902 | } | ||
| 4903 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"] | ||
| 4904 | pub const fn i2c_pb8_fmp(&self) -> bool { | ||
| 4905 | let val = (self.0 >> 18usize) & 0x01; | ||
| 4906 | val != 0 | ||
| 4907 | } | ||
| 4908 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"] | ||
| 4909 | pub fn set_i2c_pb8_fmp(&mut self, val: bool) { | ||
| 4910 | self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); | ||
| 4911 | } | ||
| 4912 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"] | ||
| 4913 | pub const fn i2c_pb9_fmp(&self) -> bool { | ||
| 4914 | let val = (self.0 >> 19usize) & 0x01; | ||
| 4915 | val != 0 | ||
| 4916 | } | ||
| 4917 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"] | ||
| 4918 | pub fn set_i2c_pb9_fmp(&mut self, val: bool) { | ||
| 4919 | self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); | ||
| 4920 | } | ||
| 4921 | #[doc = "I2C1 Fast-mode Plus driving capability activation"] | ||
| 4922 | pub const fn i2c1_fmp(&self) -> bool { | ||
| 4923 | let val = (self.0 >> 20usize) & 0x01; | ||
| 4924 | val != 0 | ||
| 4925 | } | ||
| 4926 | #[doc = "I2C1 Fast-mode Plus driving capability activation"] | ||
| 4927 | pub fn set_i2c1_fmp(&mut self, val: bool) { | ||
| 4928 | self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); | ||
| 4929 | } | ||
| 4930 | #[doc = "I2C2 Fast-mode Plus driving capability activation"] | ||
| 4931 | pub const fn i2c2_fmp(&self) -> bool { | ||
| 4932 | let val = (self.0 >> 21usize) & 0x01; | ||
| 4933 | val != 0 | ||
| 4934 | } | ||
| 4935 | #[doc = "I2C2 Fast-mode Plus driving capability activation"] | ||
| 4936 | pub fn set_i2c2_fmp(&mut self, val: bool) { | ||
| 4937 | self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); | ||
| 4938 | } | ||
| 4939 | #[doc = "I2C3 Fast-mode Plus driving capability activation"] | ||
| 4940 | pub const fn i2c3_fmp(&self) -> bool { | ||
| 4941 | let val = (self.0 >> 22usize) & 0x01; | ||
| 4942 | val != 0 | ||
| 4943 | } | ||
| 4944 | #[doc = "I2C3 Fast-mode Plus driving capability activation"] | ||
| 4945 | pub fn set_i2c3_fmp(&mut self, val: bool) { | ||
| 4946 | self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); | ||
| 4947 | } | ||
| 4948 | #[doc = "Floating Point Unit interrupts enable bits"] | ||
| 4949 | pub const fn fpu_ie(&self) -> u8 { | ||
| 4950 | let val = (self.0 >> 26usize) & 0x3f; | ||
| 4951 | val as u8 | ||
| 4952 | } | ||
| 4953 | #[doc = "Floating Point Unit interrupts enable bits"] | ||
| 4954 | pub fn set_fpu_ie(&mut self, val: u8) { | ||
| 4955 | self.0 = (self.0 & !(0x3f << 26usize)) | (((val as u32) & 0x3f) << 26usize); | ||
| 4956 | } | ||
| 4957 | } | ||
| 4958 | impl Default for Cfgr1 { | ||
| 4959 | fn default() -> Cfgr1 { | ||
| 4960 | Cfgr1(0) | ||
| 4961 | } | ||
| 4962 | } | 4905 | } |
| 4963 | #[doc = "memory remap register"] | ||
| 4964 | #[repr(transparent)] | 4906 | #[repr(transparent)] |
| 4965 | #[derive(Copy, Clone, Eq, PartialEq)] | 4907 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 4966 | pub struct Memrmp(pub u32); | 4908 | pub struct Rwu(pub u8); |
| 4967 | impl Memrmp { | 4909 | impl Rwu { |
| 4968 | #[doc = "Memory mapping selection"] | 4910 | #[doc = "Receiver in active mode"] |
| 4969 | pub const fn mem_mode(&self) -> u8 { | 4911 | pub const ACTIVE: Self = Self(0); |
| 4970 | let val = (self.0 >> 0usize) & 0x07; | 4912 | #[doc = "Receiver in mute mode"] |
| 4971 | val as u8 | 4913 | pub const MUTE: Self = Self(0x01); |
| 4972 | } | ||
| 4973 | #[doc = "Memory mapping selection"] | ||
| 4974 | pub fn set_mem_mode(&mut self, val: u8) { | ||
| 4975 | self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); | ||
| 4976 | } | ||
| 4977 | #[doc = "QUADSPI memory mapping swap"] | ||
| 4978 | pub const fn qfs(&self) -> bool { | ||
| 4979 | let val = (self.0 >> 3usize) & 0x01; | ||
| 4980 | val != 0 | ||
| 4981 | } | ||
| 4982 | #[doc = "QUADSPI memory mapping swap"] | ||
| 4983 | pub fn set_qfs(&mut self, val: bool) { | ||
| 4984 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | ||
| 4985 | } | ||
| 4986 | #[doc = "Flash Bank mode selection"] | ||
| 4987 | pub const fn fb_mode(&self) -> bool { | ||
| 4988 | let val = (self.0 >> 8usize) & 0x01; | ||
| 4989 | val != 0 | ||
| 4990 | } | ||
| 4991 | #[doc = "Flash Bank mode selection"] | ||
| 4992 | pub fn set_fb_mode(&mut self, val: bool) { | ||
| 4993 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | ||
| 4994 | } | ||
| 4995 | } | ||
| 4996 | impl Default for Memrmp { | ||
| 4997 | fn default() -> Memrmp { | ||
| 4998 | Memrmp(0) | ||
| 4999 | } | ||
| 5000 | } | 4914 | } |
| 5001 | #[doc = "external interrupt configuration register 4"] | ||
| 5002 | #[repr(transparent)] | 4915 | #[repr(transparent)] |
| 5003 | #[derive(Copy, Clone, Eq, PartialEq)] | 4916 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5004 | pub struct Exticr(pub u32); | 4917 | pub struct M(pub u8); |
| 5005 | impl Exticr { | 4918 | impl M { |
| 5006 | #[doc = "EXTI12 configuration bits"] | 4919 | #[doc = "8 data bits"] |
| 5007 | pub fn exti(&self, n: usize) -> u8 { | 4920 | pub const M8: Self = Self(0); |
| 5008 | assert!(n < 4usize); | 4921 | #[doc = "9 data bits"] |
| 5009 | let offs = 0usize + n * 4usize; | 4922 | pub const M9: Self = Self(0x01); |
| 5010 | let val = (self.0 >> offs) & 0x0f; | ||
| 5011 | val as u8 | ||
| 5012 | } | ||
| 5013 | #[doc = "EXTI12 configuration bits"] | ||
| 5014 | pub fn set_exti(&mut self, n: usize, val: u8) { | ||
| 5015 | assert!(n < 4usize); | ||
| 5016 | let offs = 0usize + n * 4usize; | ||
| 5017 | self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs); | ||
| 5018 | } | ||
| 5019 | } | ||
| 5020 | impl Default for Exticr { | ||
| 5021 | fn default() -> Exticr { | ||
| 5022 | Exticr(0) | ||
| 5023 | } | ||
| 5024 | } | 4923 | } |
| 5025 | #[doc = "CFGR2"] | ||
| 5026 | #[repr(transparent)] | 4924 | #[repr(transparent)] |
| 5027 | #[derive(Copy, Clone, Eq, PartialEq)] | 4925 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5028 | pub struct Cfgr2(pub u32); | 4926 | pub struct Stop(pub u8); |
| 5029 | impl Cfgr2 { | 4927 | impl Stop { |
| 5030 | #[doc = "Cortex LOCKUP (Hardfault) output enable bit"] | 4928 | #[doc = "1 stop bit"] |
| 5031 | pub const fn cll(&self) -> bool { | 4929 | pub const STOP1: Self = Self(0); |
| 5032 | let val = (self.0 >> 0usize) & 0x01; | 4930 | #[doc = "0.5 stop bits"] |
| 5033 | val != 0 | 4931 | pub const STOP0P5: Self = Self(0x01); |
| 5034 | } | 4932 | #[doc = "2 stop bits"] |
| 5035 | #[doc = "Cortex LOCKUP (Hardfault) output enable bit"] | 4933 | pub const STOP2: Self = Self(0x02); |
| 5036 | pub fn set_cll(&mut self, val: bool) { | 4934 | #[doc = "1.5 stop bits"] |
| 5037 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 4935 | pub const STOP1P5: Self = Self(0x03); |
| 5038 | } | ||
| 5039 | #[doc = "SRAM2 parity lock bit"] | ||
| 5040 | pub const fn spl(&self) -> bool { | ||
| 5041 | let val = (self.0 >> 1usize) & 0x01; | ||
| 5042 | val != 0 | ||
| 5043 | } | ||
| 5044 | #[doc = "SRAM2 parity lock bit"] | ||
| 5045 | pub fn set_spl(&mut self, val: bool) { | ||
| 5046 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 5047 | } | ||
| 5048 | #[doc = "PVD lock enable bit"] | ||
| 5049 | pub const fn pvdl(&self) -> bool { | ||
| 5050 | let val = (self.0 >> 2usize) & 0x01; | ||
| 5051 | val != 0 | ||
| 5052 | } | ||
| 5053 | #[doc = "PVD lock enable bit"] | ||
| 5054 | pub fn set_pvdl(&mut self, val: bool) { | ||
| 5055 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | ||
| 5056 | } | ||
| 5057 | #[doc = "ECC Lock"] | ||
| 5058 | pub const fn eccl(&self) -> bool { | ||
| 5059 | let val = (self.0 >> 3usize) & 0x01; | ||
| 5060 | val != 0 | ||
| 5061 | } | ||
| 5062 | #[doc = "ECC Lock"] | ||
| 5063 | pub fn set_eccl(&mut self, val: bool) { | ||
| 5064 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | ||
| 5065 | } | ||
| 5066 | #[doc = "SRAM2 parity error flag"] | ||
| 5067 | pub const fn spf(&self) -> bool { | ||
| 5068 | let val = (self.0 >> 8usize) & 0x01; | ||
| 5069 | val != 0 | ||
| 5070 | } | ||
| 5071 | #[doc = "SRAM2 parity error flag"] | ||
| 5072 | pub fn set_spf(&mut self, val: bool) { | ||
| 5073 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | ||
| 5074 | } | ||
| 5075 | } | 4936 | } |
| 5076 | impl Default for Cfgr2 { | 4937 | #[repr(transparent)] |
| 5077 | fn default() -> Cfgr2 { | 4938 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5078 | Cfgr2(0) | 4939 | pub struct Cpha(pub u8); |
| 5079 | } | 4940 | impl Cpha { |
| 4941 | #[doc = "The first clock transition is the first data capture edge"] | ||
| 4942 | pub const FIRST: Self = Self(0); | ||
| 4943 | #[doc = "The second clock transition is the first data capture edge"] | ||
| 4944 | pub const SECOND: Self = Self(0x01); | ||
| 5080 | } | 4945 | } |
| 5081 | #[doc = "SCSR"] | ||
| 5082 | #[repr(transparent)] | 4946 | #[repr(transparent)] |
| 5083 | #[derive(Copy, Clone, Eq, PartialEq)] | 4947 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5084 | pub struct Scsr(pub u32); | 4948 | pub struct Lbdl(pub u8); |
| 5085 | impl Scsr { | 4949 | impl Lbdl { |
| 5086 | #[doc = "SRAM2 Erase"] | 4950 | #[doc = "10-bit break detection"] |
| 5087 | pub const fn sram2er(&self) -> bool { | 4951 | pub const LBDL10: Self = Self(0); |
| 5088 | let val = (self.0 >> 0usize) & 0x01; | 4952 | #[doc = "11-bit break detection"] |
| 5089 | val != 0 | 4953 | pub const LBDL11: Self = Self(0x01); |
| 5090 | } | ||
| 5091 | #[doc = "SRAM2 Erase"] | ||
| 5092 | pub fn set_sram2er(&mut self, val: bool) { | ||
| 5093 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 5094 | } | ||
| 5095 | #[doc = "SRAM2 busy by erase operation"] | ||
| 5096 | pub const fn sram2bsy(&self) -> bool { | ||
| 5097 | let val = (self.0 >> 1usize) & 0x01; | ||
| 5098 | val != 0 | ||
| 5099 | } | ||
| 5100 | #[doc = "SRAM2 busy by erase operation"] | ||
| 5101 | pub fn set_sram2bsy(&mut self, val: bool) { | ||
| 5102 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 5103 | } | ||
| 5104 | } | 4954 | } |
| 5105 | impl Default for Scsr { | 4955 | #[repr(transparent)] |
| 5106 | fn default() -> Scsr { | 4956 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5107 | Scsr(0) | 4957 | pub struct Sbk(pub u8); |
| 5108 | } | 4958 | impl Sbk { |
| 4959 | #[doc = "No break character is transmitted"] | ||
| 4960 | pub const NOBREAK: Self = Self(0); | ||
| 4961 | #[doc = "Break character transmitted"] | ||
| 4962 | pub const BREAK: Self = Self(0x01); | ||
| 5109 | } | 4963 | } |
| 5110 | #[doc = "SWPR"] | ||
| 5111 | #[repr(transparent)] | 4964 | #[repr(transparent)] |
| 5112 | #[derive(Copy, Clone, Eq, PartialEq)] | 4965 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5113 | pub struct Swpr(pub u32); | 4966 | pub struct Cpol(pub u8); |
| 5114 | impl Swpr { | 4967 | impl Cpol { |
| 5115 | #[doc = "SRAWM2 write protection."] | 4968 | #[doc = "Steady low value on CK pin outside transmission window"] |
| 5116 | pub fn pwp(&self, n: usize) -> bool { | 4969 | pub const LOW: Self = Self(0); |
| 5117 | assert!(n < 32usize); | 4970 | #[doc = "Steady high value on CK pin outside transmission window"] |
| 5118 | let offs = 0usize + n * 1usize; | 4971 | pub const HIGH: Self = Self(0x01); |
| 5119 | let val = (self.0 >> offs) & 0x01; | ||
| 5120 | val != 0 | ||
| 5121 | } | ||
| 5122 | #[doc = "SRAWM2 write protection."] | ||
| 5123 | pub fn set_pwp(&mut self, n: usize, val: bool) { | ||
| 5124 | assert!(n < 32usize); | ||
| 5125 | let offs = 0usize + n * 1usize; | ||
| 5126 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 5127 | } | ||
| 5128 | } | 4972 | } |
| 5129 | impl Default for Swpr { | 4973 | #[repr(transparent)] |
| 5130 | fn default() -> Swpr { | 4974 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5131 | Swpr(0) | 4975 | pub struct Hdsel(pub u8); |
| 5132 | } | 4976 | impl Hdsel { |
| 4977 | #[doc = "Half duplex mode is not selected"] | ||
| 4978 | pub const FULLDUPLEX: Self = Self(0); | ||
| 4979 | #[doc = "Half duplex mode is selected"] | ||
| 4980 | pub const HALFDUPLEX: Self = Self(0x01); | ||
| 5133 | } | 4981 | } |
| 5134 | #[doc = "SKR"] | ||
| 5135 | #[repr(transparent)] | 4982 | #[repr(transparent)] |
| 5136 | #[derive(Copy, Clone, Eq, PartialEq)] | 4983 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5137 | pub struct Skr(pub u32); | 4984 | pub struct Irlp(pub u8); |
| 5138 | impl Skr { | 4985 | impl Irlp { |
| 5139 | #[doc = "SRAM2 write protection key for software erase"] | 4986 | #[doc = "Normal mode"] |
| 5140 | pub const fn key(&self) -> u8 { | 4987 | pub const NORMAL: Self = Self(0); |
| 5141 | let val = (self.0 >> 0usize) & 0xff; | 4988 | #[doc = "Low-power mode"] |
| 5142 | val as u8 | 4989 | pub const LOWPOWER: Self = Self(0x01); |
| 5143 | } | ||
| 5144 | #[doc = "SRAM2 write protection key for software erase"] | ||
| 5145 | pub fn set_key(&mut self, val: u8) { | ||
| 5146 | self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); | ||
| 5147 | } | ||
| 5148 | } | 4990 | } |
| 5149 | impl Default for Skr { | 4991 | #[repr(transparent)] |
| 5150 | fn default() -> Skr { | 4992 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5151 | Skr(0) | 4993 | pub struct Ps(pub u8); |
| 5152 | } | 4994 | impl Ps { |
| 4995 | #[doc = "Even parity"] | ||
| 4996 | pub const EVEN: Self = Self(0); | ||
| 4997 | #[doc = "Odd parity"] | ||
| 4998 | pub const ODD: Self = Self(0x01); | ||
| 5153 | } | 4999 | } |
| 5154 | } | 5000 | } |
| 5155 | } | 5001 | } |
| 5156 | pub mod gpio_v1 { | 5002 | pub mod spi_v1 { |
| 5157 | use crate::generic::*; | 5003 | use crate::generic::*; |
| 5158 | #[doc = "General purpose I/O"] | 5004 | #[doc = "Serial peripheral interface"] |
| 5159 | #[derive(Copy, Clone)] | 5005 | #[derive(Copy, Clone)] |
| 5160 | pub struct Gpio(pub *mut u8); | 5006 | pub struct Spi(pub *mut u8); |
| 5161 | unsafe impl Send for Gpio {} | 5007 | unsafe impl Send for Spi {} |
| 5162 | unsafe impl Sync for Gpio {} | 5008 | unsafe impl Sync for Spi {} |
| 5163 | impl Gpio { | 5009 | impl Spi { |
| 5164 | #[doc = "Port configuration register low (GPIOn_CRL)"] | 5010 | #[doc = "control register 1"] |
| 5165 | pub fn cr(self, n: usize) -> Reg<regs::Cr, RW> { | 5011 | pub fn cr1(self) -> Reg<regs::Cr1, RW> { |
| 5166 | assert!(n < 2usize); | 5012 | unsafe { Reg::from_ptr(self.0.add(0usize)) } |
| 5167 | unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) } | ||
| 5168 | } | 5013 | } |
| 5169 | #[doc = "Port input data register (GPIOn_IDR)"] | 5014 | #[doc = "control register 2"] |
| 5170 | pub fn idr(self) -> Reg<regs::Idr, R> { | 5015 | pub fn cr2(self) -> Reg<regs::Cr2, RW> { |
| 5016 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 5017 | } | ||
| 5018 | #[doc = "status register"] | ||
| 5019 | pub fn sr(self) -> Reg<regs::Sr, RW> { | ||
| 5171 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | 5020 | unsafe { Reg::from_ptr(self.0.add(8usize)) } |
| 5172 | } | 5021 | } |
| 5173 | #[doc = "Port output data register (GPIOn_ODR)"] | 5022 | #[doc = "data register"] |
| 5174 | pub fn odr(self) -> Reg<regs::Odr, RW> { | 5023 | pub fn dr(self) -> Reg<regs::Dr, RW> { |
| 5175 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | 5024 | unsafe { Reg::from_ptr(self.0.add(12usize)) } |
| 5176 | } | 5025 | } |
| 5177 | #[doc = "Port bit set/reset register (GPIOn_BSRR)"] | 5026 | #[doc = "CRC polynomial register"] |
| 5178 | pub fn bsrr(self) -> Reg<regs::Bsrr, W> { | 5027 | pub fn crcpr(self) -> Reg<regs::Crcpr, RW> { |
| 5179 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | 5028 | unsafe { Reg::from_ptr(self.0.add(16usize)) } |
| 5180 | } | 5029 | } |
| 5181 | #[doc = "Port bit reset register (GPIOn_BRR)"] | 5030 | #[doc = "RX CRC register"] |
| 5182 | pub fn brr(self) -> Reg<regs::Brr, W> { | 5031 | pub fn rxcrcr(self) -> Reg<regs::Rxcrcr, R> { |
| 5183 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | 5032 | unsafe { Reg::from_ptr(self.0.add(20usize)) } |
| 5184 | } | 5033 | } |
| 5185 | #[doc = "Port configuration lock register"] | 5034 | #[doc = "TX CRC register"] |
| 5186 | pub fn lckr(self) -> Reg<regs::Lckr, RW> { | 5035 | pub fn txcrcr(self) -> Reg<regs::Txcrcr, R> { |
| 5187 | unsafe { Reg::from_ptr(self.0.add(24usize)) } | 5036 | unsafe { Reg::from_ptr(self.0.add(24usize)) } |
| 5188 | } | 5037 | } |
| 5189 | } | 5038 | } |
| 5190 | pub mod regs { | 5039 | pub mod vals { |
| 5191 | use crate::generic::*; | 5040 | use crate::generic::*; |
| 5192 | #[doc = "Port bit reset register (GPIOn_BRR)"] | ||
| 5193 | #[repr(transparent)] | 5041 | #[repr(transparent)] |
| 5194 | #[derive(Copy, Clone, Eq, PartialEq)] | 5042 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5195 | pub struct Brr(pub u32); | 5043 | pub struct Frer(pub u8); |
| 5196 | impl Brr { | 5044 | impl Frer { |
| 5197 | #[doc = "Reset bit"] | 5045 | #[doc = "No frame format error"] |
| 5198 | pub fn br(&self, n: usize) -> bool { | 5046 | pub const NOERROR: Self = Self(0); |
| 5199 | assert!(n < 16usize); | 5047 | #[doc = "A frame format error occurred"] |
| 5200 | let offs = 0usize + n * 1usize; | 5048 | pub const ERROR: Self = Self(0x01); |
| 5201 | let val = (self.0 >> offs) & 0x01; | ||
| 5202 | val != 0 | ||
| 5203 | } | ||
| 5204 | #[doc = "Reset bit"] | ||
| 5205 | pub fn set_br(&mut self, n: usize, val: bool) { | ||
| 5206 | assert!(n < 16usize); | ||
| 5207 | let offs = 0usize + n * 1usize; | ||
| 5208 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 5209 | } | ||
| 5210 | } | ||
| 5211 | impl Default for Brr { | ||
| 5212 | fn default() -> Brr { | ||
| 5213 | Brr(0) | ||
| 5214 | } | ||
| 5215 | } | ||
| 5216 | #[doc = "Port configuration register (GPIOn_CRx)"] | ||
| 5217 | #[repr(transparent)] | ||
| 5218 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 5219 | pub struct Cr(pub u32); | ||
| 5220 | impl Cr { | ||
| 5221 | #[doc = "Port n mode bits"] | ||
| 5222 | pub fn mode(&self, n: usize) -> super::vals::Mode { | ||
| 5223 | assert!(n < 8usize); | ||
| 5224 | let offs = 0usize + n * 4usize; | ||
| 5225 | let val = (self.0 >> offs) & 0x03; | ||
| 5226 | super::vals::Mode(val as u8) | ||
| 5227 | } | ||
| 5228 | #[doc = "Port n mode bits"] | ||
| 5229 | pub fn set_mode(&mut self, n: usize, val: super::vals::Mode) { | ||
| 5230 | assert!(n < 8usize); | ||
| 5231 | let offs = 0usize + n * 4usize; | ||
| 5232 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 5233 | } | ||
| 5234 | #[doc = "Port n configuration bits"] | ||
| 5235 | pub fn cnf(&self, n: usize) -> super::vals::Cnf { | ||
| 5236 | assert!(n < 8usize); | ||
| 5237 | let offs = 2usize + n * 4usize; | ||
| 5238 | let val = (self.0 >> offs) & 0x03; | ||
| 5239 | super::vals::Cnf(val as u8) | ||
| 5240 | } | ||
| 5241 | #[doc = "Port n configuration bits"] | ||
| 5242 | pub fn set_cnf(&mut self, n: usize, val: super::vals::Cnf) { | ||
| 5243 | assert!(n < 8usize); | ||
| 5244 | let offs = 2usize + n * 4usize; | ||
| 5245 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 5246 | } | ||
| 5247 | } | ||
| 5248 | impl Default for Cr { | ||
| 5249 | fn default() -> Cr { | ||
| 5250 | Cr(0) | ||
| 5251 | } | ||
| 5252 | } | 5049 | } |
| 5253 | #[doc = "Port input data register (GPIOn_IDR)"] | ||
| 5254 | #[repr(transparent)] | 5050 | #[repr(transparent)] |
| 5255 | #[derive(Copy, Clone, Eq, PartialEq)] | 5051 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5256 | pub struct Idr(pub u32); | 5052 | pub struct Iscfg(pub u8); |
| 5257 | impl Idr { | 5053 | impl Iscfg { |
| 5258 | #[doc = "Port input data"] | 5054 | #[doc = "Slave - transmit"] |
| 5259 | pub fn idr(&self, n: usize) -> super::vals::Idr { | 5055 | pub const SLAVETX: Self = Self(0); |
| 5260 | assert!(n < 16usize); | 5056 | #[doc = "Slave - receive"] |
| 5261 | let offs = 0usize + n * 1usize; | 5057 | pub const SLAVERX: Self = Self(0x01); |
| 5262 | let val = (self.0 >> offs) & 0x01; | 5058 | #[doc = "Master - transmit"] |
| 5263 | super::vals::Idr(val as u8) | 5059 | pub const MASTERTX: Self = Self(0x02); |
| 5264 | } | 5060 | #[doc = "Master - receive"] |
| 5265 | #[doc = "Port input data"] | 5061 | pub const MASTERRX: Self = Self(0x03); |
| 5266 | pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) { | ||
| 5267 | assert!(n < 16usize); | ||
| 5268 | let offs = 0usize + n * 1usize; | ||
| 5269 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 5270 | } | ||
| 5271 | } | ||
| 5272 | impl Default for Idr { | ||
| 5273 | fn default() -> Idr { | ||
| 5274 | Idr(0) | ||
| 5275 | } | ||
| 5276 | } | 5062 | } |
| 5277 | #[doc = "Port bit set/reset register (GPIOn_BSRR)"] | ||
| 5278 | #[repr(transparent)] | 5063 | #[repr(transparent)] |
| 5279 | #[derive(Copy, Clone, Eq, PartialEq)] | 5064 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5280 | pub struct Bsrr(pub u32); | 5065 | pub struct Frf(pub u8); |
| 5281 | impl Bsrr { | 5066 | impl Frf { |
| 5282 | #[doc = "Set bit"] | 5067 | #[doc = "SPI Motorola mode"] |
| 5283 | pub fn bs(&self, n: usize) -> bool { | 5068 | pub const MOTOROLA: Self = Self(0); |
| 5284 | assert!(n < 16usize); | 5069 | #[doc = "SPI TI mode"] |
| 5285 | let offs = 0usize + n * 1usize; | 5070 | pub const TI: Self = Self(0x01); |
| 5286 | let val = (self.0 >> offs) & 0x01; | ||
| 5287 | val != 0 | ||
| 5288 | } | ||
| 5289 | #[doc = "Set bit"] | ||
| 5290 | pub fn set_bs(&mut self, n: usize, val: bool) { | ||
| 5291 | assert!(n < 16usize); | ||
| 5292 | let offs = 0usize + n * 1usize; | ||
| 5293 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 5294 | } | ||
| 5295 | #[doc = "Reset bit"] | ||
| 5296 | pub fn br(&self, n: usize) -> bool { | ||
| 5297 | assert!(n < 16usize); | ||
| 5298 | let offs = 16usize + n * 1usize; | ||
| 5299 | let val = (self.0 >> offs) & 0x01; | ||
| 5300 | val != 0 | ||
| 5301 | } | ||
| 5302 | #[doc = "Reset bit"] | ||
| 5303 | pub fn set_br(&mut self, n: usize, val: bool) { | ||
| 5304 | assert!(n < 16usize); | ||
| 5305 | let offs = 16usize + n * 1usize; | ||
| 5306 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 5307 | } | ||
| 5308 | } | ||
| 5309 | impl Default for Bsrr { | ||
| 5310 | fn default() -> Bsrr { | ||
| 5311 | Bsrr(0) | ||
| 5312 | } | ||
| 5313 | } | 5071 | } |
| 5314 | #[doc = "Port configuration lock register"] | ||
| 5315 | #[repr(transparent)] | 5072 | #[repr(transparent)] |
| 5316 | #[derive(Copy, Clone, Eq, PartialEq)] | 5073 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5317 | pub struct Lckr(pub u32); | 5074 | pub struct Rxonly(pub u8); |
| 5318 | impl Lckr { | 5075 | impl Rxonly { |
| 5319 | #[doc = "Port A Lock bit"] | 5076 | #[doc = "Full duplex (Transmit and receive)"] |
| 5320 | pub fn lck(&self, n: usize) -> super::vals::Lck { | 5077 | pub const FULLDUPLEX: Self = Self(0); |
| 5321 | assert!(n < 16usize); | 5078 | #[doc = "Output disabled (Receive-only mode)"] |
| 5322 | let offs = 0usize + n * 1usize; | 5079 | pub const OUTPUTDISABLED: Self = Self(0x01); |
| 5323 | let val = (self.0 >> offs) & 0x01; | ||
| 5324 | super::vals::Lck(val as u8) | ||
| 5325 | } | ||
| 5326 | #[doc = "Port A Lock bit"] | ||
| 5327 | pub fn set_lck(&mut self, n: usize, val: super::vals::Lck) { | ||
| 5328 | assert!(n < 16usize); | ||
| 5329 | let offs = 0usize + n * 1usize; | ||
| 5330 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 5331 | } | ||
| 5332 | #[doc = "Lock key"] | ||
| 5333 | pub const fn lckk(&self) -> super::vals::Lckk { | ||
| 5334 | let val = (self.0 >> 16usize) & 0x01; | ||
| 5335 | super::vals::Lckk(val as u8) | ||
| 5336 | } | ||
| 5337 | #[doc = "Lock key"] | ||
| 5338 | pub fn set_lckk(&mut self, val: super::vals::Lckk) { | ||
| 5339 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val.0 as u32) & 0x01) << 16usize); | ||
| 5340 | } | ||
| 5341 | } | ||
| 5342 | impl Default for Lckr { | ||
| 5343 | fn default() -> Lckr { | ||
| 5344 | Lckr(0) | ||
| 5345 | } | ||
| 5346 | } | 5080 | } |
| 5347 | #[doc = "Port output data register (GPIOn_ODR)"] | ||
| 5348 | #[repr(transparent)] | 5081 | #[repr(transparent)] |
| 5349 | #[derive(Copy, Clone, Eq, PartialEq)] | 5082 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5350 | pub struct Odr(pub u32); | 5083 | pub struct Cpol(pub u8); |
| 5351 | impl Odr { | 5084 | impl Cpol { |
| 5352 | #[doc = "Port output data"] | 5085 | #[doc = "CK to 0 when idle"] |
| 5353 | pub fn odr(&self, n: usize) -> super::vals::Odr { | 5086 | pub const IDLELOW: Self = Self(0); |
| 5354 | assert!(n < 16usize); | 5087 | #[doc = "CK to 1 when idle"] |
| 5355 | let offs = 0usize + n * 1usize; | 5088 | pub const IDLEHIGH: Self = Self(0x01); |
| 5356 | let val = (self.0 >> offs) & 0x01; | ||
| 5357 | super::vals::Odr(val as u8) | ||
| 5358 | } | ||
| 5359 | #[doc = "Port output data"] | ||
| 5360 | pub fn set_odr(&mut self, n: usize, val: super::vals::Odr) { | ||
| 5361 | assert!(n < 16usize); | ||
| 5362 | let offs = 0usize + n * 1usize; | ||
| 5363 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 5364 | } | ||
| 5365 | } | ||
| 5366 | impl Default for Odr { | ||
| 5367 | fn default() -> Odr { | ||
| 5368 | Odr(0) | ||
| 5369 | } | ||
| 5370 | } | 5089 | } |
| 5371 | } | ||
| 5372 | pub mod vals { | ||
| 5373 | use crate::generic::*; | ||
| 5374 | #[repr(transparent)] | 5090 | #[repr(transparent)] |
| 5375 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 5091 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5376 | pub struct Idr(pub u8); | 5092 | pub struct Mstr(pub u8); |
| 5377 | impl Idr { | 5093 | impl Mstr { |
| 5378 | #[doc = "Input is logic low"] | 5094 | #[doc = "Slave configuration"] |
| 5379 | pub const LOW: Self = Self(0); | 5095 | pub const SLAVE: Self = Self(0); |
| 5380 | #[doc = "Input is logic high"] | 5096 | #[doc = "Master configuration"] |
| 5381 | pub const HIGH: Self = Self(0x01); | 5097 | pub const MASTER: Self = Self(0x01); |
| 5382 | } | 5098 | } |
| 5383 | #[repr(transparent)] | 5099 | #[repr(transparent)] |
| 5384 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 5100 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5385 | pub struct Odr(pub u8); | 5101 | pub struct Lsbfirst(pub u8); |
| 5386 | impl Odr { | 5102 | impl Lsbfirst { |
| 5387 | #[doc = "Set output to logic low"] | 5103 | #[doc = "Data is transmitted/received with the MSB first"] |
| 5388 | pub const LOW: Self = Self(0); | 5104 | pub const MSBFIRST: Self = Self(0); |
| 5389 | #[doc = "Set output to logic high"] | 5105 | #[doc = "Data is transmitted/received with the LSB first"] |
| 5390 | pub const HIGH: Self = Self(0x01); | 5106 | pub const LSBFIRST: Self = Self(0x01); |
| 5391 | } | 5107 | } |
| 5392 | #[repr(transparent)] | 5108 | #[repr(transparent)] |
| 5393 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 5109 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5394 | pub struct Mode(pub u8); | 5110 | pub struct Bidimode(pub u8); |
| 5395 | impl Mode { | 5111 | impl Bidimode { |
| 5396 | #[doc = "Input mode (reset state)"] | 5112 | #[doc = "2-line unidirectional data mode selected"] |
| 5397 | pub const INPUT: Self = Self(0); | 5113 | pub const UNIDIRECTIONAL: Self = Self(0); |
| 5398 | #[doc = "Output mode 10 MHz"] | 5114 | #[doc = "1-line bidirectional data mode selected"] |
| 5399 | pub const OUTPUT: Self = Self(0x01); | 5115 | pub const BIDIRECTIONAL: Self = Self(0x01); |
| 5400 | #[doc = "Output mode 2 MHz"] | ||
| 5401 | pub const OUTPUT2: Self = Self(0x02); | ||
| 5402 | #[doc = "Output mode 50 MHz"] | ||
| 5403 | pub const OUTPUT50: Self = Self(0x03); | ||
| 5404 | } | 5116 | } |
| 5405 | #[repr(transparent)] | 5117 | #[repr(transparent)] |
| 5406 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 5118 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5407 | pub struct Lckk(pub u8); | 5119 | pub struct Bidioe(pub u8); |
| 5408 | impl Lckk { | 5120 | impl Bidioe { |
| 5409 | #[doc = "Port configuration lock key not active"] | 5121 | #[doc = "Output disabled (receive-only mode)"] |
| 5410 | pub const NOTACTIVE: Self = Self(0); | 5122 | pub const OUTPUTDISABLED: Self = Self(0); |
| 5411 | #[doc = "Port configuration lock key active"] | 5123 | #[doc = "Output enabled (transmit-only mode)"] |
| 5412 | pub const ACTIVE: Self = Self(0x01); | 5124 | pub const OUTPUTENABLED: Self = Self(0x01); |
| 5413 | } | 5125 | } |
| 5414 | #[repr(transparent)] | 5126 | #[repr(transparent)] |
| 5415 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 5127 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5416 | pub struct Lck(pub u8); | 5128 | pub struct Crcnext(pub u8); |
| 5417 | impl Lck { | 5129 | impl Crcnext { |
| 5418 | #[doc = "Port configuration not locked"] | 5130 | #[doc = "Next transmit value is from Tx buffer"] |
| 5419 | pub const UNLOCKED: Self = Self(0); | 5131 | pub const TXBUFFER: Self = Self(0); |
| 5420 | #[doc = "Port configuration locked"] | 5132 | #[doc = "Next transmit value is from Tx CRC register"] |
| 5421 | pub const LOCKED: Self = Self(0x01); | 5133 | pub const CRC: Self = Self(0x01); |
| 5422 | } | 5134 | } |
| 5423 | #[repr(transparent)] | 5135 | #[repr(transparent)] |
| 5424 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 5136 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5425 | pub struct Brw(pub u8); | 5137 | pub struct Cpha(pub u8); |
| 5426 | impl Brw { | 5138 | impl Cpha { |
| 5427 | #[doc = "No action on the corresponding ODx bit"] | 5139 | #[doc = "The first clock transition is the first data capture edge"] |
| 5428 | pub const NOACTION: Self = Self(0); | 5140 | pub const FIRSTEDGE: Self = Self(0); |
| 5429 | #[doc = "Reset the ODx bit"] | 5141 | #[doc = "The second clock transition is the first data capture edge"] |
| 5430 | pub const RESET: Self = Self(0x01); | 5142 | pub const SECONDEDGE: Self = Self(0x01); |
| 5431 | } | 5143 | } |
| 5432 | #[repr(transparent)] | 5144 | #[repr(transparent)] |
| 5433 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 5145 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5434 | pub struct Bsw(pub u8); | 5146 | pub struct Br(pub u8); |
| 5435 | impl Bsw { | 5147 | impl Br { |
| 5436 | #[doc = "No action on the corresponding ODx bit"] | 5148 | #[doc = "f_PCLK / 2"] |
| 5437 | pub const NOACTION: Self = Self(0); | 5149 | pub const DIV2: Self = Self(0); |
| 5438 | #[doc = "Sets the corresponding ODRx bit"] | 5150 | #[doc = "f_PCLK / 4"] |
| 5439 | pub const SET: Self = Self(0x01); | 5151 | pub const DIV4: Self = Self(0x01); |
| 5152 | #[doc = "f_PCLK / 8"] | ||
| 5153 | pub const DIV8: Self = Self(0x02); | ||
| 5154 | #[doc = "f_PCLK / 16"] | ||
| 5155 | pub const DIV16: Self = Self(0x03); | ||
| 5156 | #[doc = "f_PCLK / 32"] | ||
| 5157 | pub const DIV32: Self = Self(0x04); | ||
| 5158 | #[doc = "f_PCLK / 64"] | ||
| 5159 | pub const DIV64: Self = Self(0x05); | ||
| 5160 | #[doc = "f_PCLK / 128"] | ||
| 5161 | pub const DIV128: Self = Self(0x06); | ||
| 5162 | #[doc = "f_PCLK / 256"] | ||
| 5163 | pub const DIV256: Self = Self(0x07); | ||
| 5440 | } | 5164 | } |
| 5441 | #[repr(transparent)] | 5165 | #[repr(transparent)] |
| 5442 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 5166 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 5443 | pub struct Cnf(pub u8); | 5167 | pub struct Dff(pub u8); |
| 5444 | impl Cnf { | 5168 | impl Dff { |
| 5445 | #[doc = "Analog mode / Push-Pull mode"] | 5169 | #[doc = "8-bit data frame format is selected for transmission/reception"] |
| 5446 | pub const PUSHPULL: Self = Self(0); | 5170 | pub const EIGHTBIT: Self = Self(0); |
| 5447 | #[doc = "Floating input (reset state) / Open Drain-Mode"] | 5171 | #[doc = "16-bit data frame format is selected for transmission/reception"] |
| 5448 | pub const OPENDRAIN: Self = Self(0x01); | 5172 | pub const SIXTEENBIT: Self = Self(0x01); |
| 5449 | #[doc = "Input with pull-up/pull-down / Alternate Function Push-Pull Mode"] | ||
| 5450 | pub const ALTPUSHPULL: Self = Self(0x02); | ||
| 5451 | #[doc = "Alternate Function Open-Drain Mode"] | ||
| 5452 | pub const ALTOPENDRAIN: Self = Self(0x03); | ||
| 5453 | } | 5173 | } |
| 5454 | } | 5174 | } |
| 5455 | } | 5175 | pub mod regs { |
| 5456 | pub mod spi_v2 { | 5176 | use crate::generic::*; |
| 5457 | use crate::generic::*; | ||
| 5458 | #[doc = "Serial peripheral interface"] | ||
| 5459 | #[derive(Copy, Clone)] | ||
| 5460 | pub struct Spi(pub *mut u8); | ||
| 5461 | unsafe impl Send for Spi {} | ||
| 5462 | unsafe impl Sync for Spi {} | ||
| 5463 | impl Spi { | ||
| 5464 | #[doc = "control register 1"] | ||
| 5465 | pub fn cr1(self) -> Reg<regs::Cr1, RW> { | ||
| 5466 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 5467 | } | ||
| 5468 | #[doc = "control register 2"] | ||
| 5469 | pub fn cr2(self) -> Reg<regs::Cr2, RW> { | ||
| 5470 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 5471 | } | ||
| 5472 | #[doc = "status register"] | 5177 | #[doc = "status register"] |
| 5473 | pub fn sr(self) -> Reg<regs::Sr, RW> { | 5178 | #[repr(transparent)] |
| 5474 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | 5179 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 5475 | } | 5180 | pub struct Sr(pub u32); |
| 5476 | #[doc = "data register"] | 5181 | impl Sr { |
| 5477 | pub fn dr(self) -> Reg<regs::Dr, RW> { | 5182 | #[doc = "Receive buffer not empty"] |
| 5478 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | 5183 | pub const fn rxne(&self) -> bool { |
| 5479 | } | 5184 | let val = (self.0 >> 0usize) & 0x01; |
| 5480 | #[doc = "CRC polynomial register"] | 5185 | val != 0 |
| 5481 | pub fn crcpr(self) -> Reg<regs::Crcpr, RW> { | 5186 | } |
| 5482 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | 5187 | #[doc = "Receive buffer not empty"] |
| 5188 | pub fn set_rxne(&mut self, val: bool) { | ||
| 5189 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 5190 | } | ||
| 5191 | #[doc = "Transmit buffer empty"] | ||
| 5192 | pub const fn txe(&self) -> bool { | ||
| 5193 | let val = (self.0 >> 1usize) & 0x01; | ||
| 5194 | val != 0 | ||
| 5195 | } | ||
| 5196 | #[doc = "Transmit buffer empty"] | ||
| 5197 | pub fn set_txe(&mut self, val: bool) { | ||
| 5198 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 5199 | } | ||
| 5200 | #[doc = "CRC error flag"] | ||
| 5201 | pub const fn crcerr(&self) -> bool { | ||
| 5202 | let val = (self.0 >> 4usize) & 0x01; | ||
| 5203 | val != 0 | ||
| 5204 | } | ||
| 5205 | #[doc = "CRC error flag"] | ||
| 5206 | pub fn set_crcerr(&mut self, val: bool) { | ||
| 5207 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | ||
| 5208 | } | ||
| 5209 | #[doc = "Mode fault"] | ||
| 5210 | pub const fn modf(&self) -> bool { | ||
| 5211 | let val = (self.0 >> 5usize) & 0x01; | ||
| 5212 | val != 0 | ||
| 5213 | } | ||
| 5214 | #[doc = "Mode fault"] | ||
| 5215 | pub fn set_modf(&mut self, val: bool) { | ||
| 5216 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | ||
| 5217 | } | ||
| 5218 | #[doc = "Overrun flag"] | ||
| 5219 | pub const fn ovr(&self) -> bool { | ||
| 5220 | let val = (self.0 >> 6usize) & 0x01; | ||
| 5221 | val != 0 | ||
| 5222 | } | ||
| 5223 | #[doc = "Overrun flag"] | ||
| 5224 | pub fn set_ovr(&mut self, val: bool) { | ||
| 5225 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | ||
| 5226 | } | ||
| 5227 | #[doc = "Busy flag"] | ||
| 5228 | pub const fn bsy(&self) -> bool { | ||
| 5229 | let val = (self.0 >> 7usize) & 0x01; | ||
| 5230 | val != 0 | ||
| 5231 | } | ||
| 5232 | #[doc = "Busy flag"] | ||
| 5233 | pub fn set_bsy(&mut self, val: bool) { | ||
| 5234 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 5235 | } | ||
| 5236 | #[doc = "TI frame format error"] | ||
| 5237 | pub const fn fre(&self) -> bool { | ||
| 5238 | let val = (self.0 >> 8usize) & 0x01; | ||
| 5239 | val != 0 | ||
| 5240 | } | ||
| 5241 | #[doc = "TI frame format error"] | ||
| 5242 | pub fn set_fre(&mut self, val: bool) { | ||
| 5243 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | ||
| 5244 | } | ||
| 5483 | } | 5245 | } |
| 5484 | #[doc = "RX CRC register"] | 5246 | impl Default for Sr { |
| 5485 | pub fn rxcrcr(self) -> Reg<regs::Rxcrcr, R> { | 5247 | fn default() -> Sr { |
| 5486 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | 5248 | Sr(0) |
| 5249 | } | ||
| 5487 | } | 5250 | } |
| 5488 | #[doc = "TX CRC register"] | 5251 | #[doc = "TX CRC register"] |
| 5489 | pub fn txcrcr(self) -> Reg<regs::Txcrcr, R> { | 5252 | #[repr(transparent)] |
| 5490 | unsafe { Reg::from_ptr(self.0.add(24usize)) } | 5253 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 5254 | pub struct Txcrcr(pub u32); | ||
| 5255 | impl Txcrcr { | ||
| 5256 | #[doc = "Tx CRC register"] | ||
| 5257 | pub const fn tx_crc(&self) -> u16 { | ||
| 5258 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 5259 | val as u16 | ||
| 5260 | } | ||
| 5261 | #[doc = "Tx CRC register"] | ||
| 5262 | pub fn set_tx_crc(&mut self, val: u16) { | ||
| 5263 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 5264 | } | ||
| 5491 | } | 5265 | } |
| 5492 | } | 5266 | impl Default for Txcrcr { |
| 5493 | pub mod regs { | 5267 | fn default() -> Txcrcr { |
| 5494 | use crate::generic::*; | 5268 | Txcrcr(0) |
| 5495 | #[doc = "data register"] | 5269 | } |
| 5270 | } | ||
| 5271 | #[doc = "RX CRC register"] | ||
| 5496 | #[repr(transparent)] | 5272 | #[repr(transparent)] |
| 5497 | #[derive(Copy, Clone, Eq, PartialEq)] | 5273 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 5498 | pub struct Dr(pub u32); | 5274 | pub struct Rxcrcr(pub u32); |
| 5499 | impl Dr { | 5275 | impl Rxcrcr { |
| 5500 | #[doc = "Data register"] | 5276 | #[doc = "Rx CRC register"] |
| 5501 | pub const fn dr(&self) -> u16 { | 5277 | pub const fn rx_crc(&self) -> u16 { |
| 5502 | let val = (self.0 >> 0usize) & 0xffff; | 5278 | let val = (self.0 >> 0usize) & 0xffff; |
| 5503 | val as u16 | 5279 | val as u16 |
| 5504 | } | 5280 | } |
| 5505 | #[doc = "Data register"] | 5281 | #[doc = "Rx CRC register"] |
| 5506 | pub fn set_dr(&mut self, val: u16) { | 5282 | pub fn set_rx_crc(&mut self, val: u16) { |
| 5507 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | 5283 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); |
| 5508 | } | 5284 | } |
| 5509 | } | 5285 | } |
| 5510 | impl Default for Dr { | 5286 | impl Default for Rxcrcr { |
| 5511 | fn default() -> Dr { | 5287 | fn default() -> Rxcrcr { |
| 5512 | Dr(0) | 5288 | Rxcrcr(0) |
| 5513 | } | 5289 | } |
| 5514 | } | 5290 | } |
| 5515 | #[doc = "control register 1"] | 5291 | #[doc = "control register 1"] |
| @@ -5598,13 +5374,13 @@ pub mod spi_v2 { | |||
| 5598 | pub fn set_rxonly(&mut self, val: super::vals::Rxonly) { | 5374 | pub fn set_rxonly(&mut self, val: super::vals::Rxonly) { |
| 5599 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); | 5375 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); |
| 5600 | } | 5376 | } |
| 5601 | #[doc = "CRC length"] | 5377 | #[doc = "Data frame format"] |
| 5602 | pub const fn crcl(&self) -> super::vals::Crcl { | 5378 | pub const fn dff(&self) -> super::vals::Dff { |
| 5603 | let val = (self.0 >> 11usize) & 0x01; | 5379 | let val = (self.0 >> 11usize) & 0x01; |
| 5604 | super::vals::Crcl(val as u8) | 5380 | super::vals::Dff(val as u8) |
| 5605 | } | 5381 | } |
| 5606 | #[doc = "CRC length"] | 5382 | #[doc = "Data frame format"] |
| 5607 | pub fn set_crcl(&mut self, val: super::vals::Crcl) { | 5383 | pub fn set_dff(&mut self, val: super::vals::Dff) { |
| 5608 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize); | 5384 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize); |
| 5609 | } | 5385 | } |
| 5610 | #[doc = "CRC transfer next"] | 5386 | #[doc = "CRC transfer next"] |
| @@ -5649,6 +5425,26 @@ pub mod spi_v2 { | |||
| 5649 | Cr1(0) | 5425 | Cr1(0) |
| 5650 | } | 5426 | } |
| 5651 | } | 5427 | } |
| 5428 | #[doc = "data register"] | ||
| 5429 | #[repr(transparent)] | ||
| 5430 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 5431 | pub struct Dr(pub u32); | ||
| 5432 | impl Dr { | ||
| 5433 | #[doc = "Data register"] | ||
| 5434 | pub const fn dr(&self) -> u16 { | ||
| 5435 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 5436 | val as u16 | ||
| 5437 | } | ||
| 5438 | #[doc = "Data register"] | ||
| 5439 | pub fn set_dr(&mut self, val: u16) { | ||
| 5440 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 5441 | } | ||
| 5442 | } | ||
| 5443 | impl Default for Dr { | ||
| 5444 | fn default() -> Dr { | ||
| 5445 | Dr(0) | ||
| 5446 | } | ||
| 5447 | } | ||
| 5652 | #[doc = "control register 2"] | 5448 | #[doc = "control register 2"] |
| 5653 | #[repr(transparent)] | 5449 | #[repr(transparent)] |
| 5654 | #[derive(Copy, Clone, Eq, PartialEq)] | 5450 | #[derive(Copy, Clone, Eq, PartialEq)] |
| @@ -5681,15 +5477,6 @@ pub mod spi_v2 { | |||
| 5681 | pub fn set_ssoe(&mut self, val: bool) { | 5477 | pub fn set_ssoe(&mut self, val: bool) { |
| 5682 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | 5478 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); |
| 5683 | } | 5479 | } |
| 5684 | #[doc = "NSS pulse management"] | ||
| 5685 | pub const fn nssp(&self) -> bool { | ||
| 5686 | let val = (self.0 >> 3usize) & 0x01; | ||
| 5687 | val != 0 | ||
| 5688 | } | ||
| 5689 | #[doc = "NSS pulse management"] | ||
| 5690 | pub fn set_nssp(&mut self, val: bool) { | ||
| 5691 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | ||
| 5692 | } | ||
| 5693 | #[doc = "Frame format"] | 5480 | #[doc = "Frame format"] |
| 5694 | pub const fn frf(&self) -> super::vals::Frf { | 5481 | pub const fn frf(&self) -> super::vals::Frf { |
| 5695 | let val = (self.0 >> 4usize) & 0x01; | 5482 | let val = (self.0 >> 4usize) & 0x01; |
| @@ -5726,180 +5513,12 @@ pub mod spi_v2 { | |||
| 5726 | pub fn set_txeie(&mut self, val: bool) { | 5513 | pub fn set_txeie(&mut self, val: bool) { |
| 5727 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | 5514 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); |
| 5728 | } | 5515 | } |
| 5729 | #[doc = "Data size"] | ||
| 5730 | pub const fn ds(&self) -> super::vals::Ds { | ||
| 5731 | let val = (self.0 >> 8usize) & 0x0f; | ||
| 5732 | super::vals::Ds(val as u8) | ||
| 5733 | } | ||
| 5734 | #[doc = "Data size"] | ||
| 5735 | pub fn set_ds(&mut self, val: super::vals::Ds) { | ||
| 5736 | self.0 = (self.0 & !(0x0f << 8usize)) | (((val.0 as u32) & 0x0f) << 8usize); | ||
| 5737 | } | ||
| 5738 | #[doc = "FIFO reception threshold"] | ||
| 5739 | pub const fn frxth(&self) -> super::vals::Frxth { | ||
| 5740 | let val = (self.0 >> 12usize) & 0x01; | ||
| 5741 | super::vals::Frxth(val as u8) | ||
| 5742 | } | ||
| 5743 | #[doc = "FIFO reception threshold"] | ||
| 5744 | pub fn set_frxth(&mut self, val: super::vals::Frxth) { | ||
| 5745 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize); | ||
| 5746 | } | ||
| 5747 | #[doc = "Last DMA transfer for reception"] | ||
| 5748 | pub const fn ldma_rx(&self) -> super::vals::LdmaRx { | ||
| 5749 | let val = (self.0 >> 13usize) & 0x01; | ||
| 5750 | super::vals::LdmaRx(val as u8) | ||
| 5751 | } | ||
| 5752 | #[doc = "Last DMA transfer for reception"] | ||
| 5753 | pub fn set_ldma_rx(&mut self, val: super::vals::LdmaRx) { | ||
| 5754 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val.0 as u32) & 0x01) << 13usize); | ||
| 5755 | } | ||
| 5756 | #[doc = "Last DMA transfer for transmission"] | ||
| 5757 | pub const fn ldma_tx(&self) -> super::vals::LdmaTx { | ||
| 5758 | let val = (self.0 >> 14usize) & 0x01; | ||
| 5759 | super::vals::LdmaTx(val as u8) | ||
| 5760 | } | ||
| 5761 | #[doc = "Last DMA transfer for transmission"] | ||
| 5762 | pub fn set_ldma_tx(&mut self, val: super::vals::LdmaTx) { | ||
| 5763 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); | ||
| 5764 | } | ||
| 5765 | } | 5516 | } |
| 5766 | impl Default for Cr2 { | 5517 | impl Default for Cr2 { |
| 5767 | fn default() -> Cr2 { | 5518 | fn default() -> Cr2 { |
| 5768 | Cr2(0) | 5519 | Cr2(0) |
| 5769 | } | 5520 | } |
| 5770 | } | 5521 | } |
| 5771 | #[doc = "TX CRC register"] | ||
| 5772 | #[repr(transparent)] | ||
| 5773 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 5774 | pub struct Txcrcr(pub u32); | ||
| 5775 | impl Txcrcr { | ||
| 5776 | #[doc = "Tx CRC register"] | ||
| 5777 | pub const fn tx_crc(&self) -> u16 { | ||
| 5778 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 5779 | val as u16 | ||
| 5780 | } | ||
| 5781 | #[doc = "Tx CRC register"] | ||
| 5782 | pub fn set_tx_crc(&mut self, val: u16) { | ||
| 5783 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 5784 | } | ||
| 5785 | } | ||
| 5786 | impl Default for Txcrcr { | ||
| 5787 | fn default() -> Txcrcr { | ||
| 5788 | Txcrcr(0) | ||
| 5789 | } | ||
| 5790 | } | ||
| 5791 | #[doc = "RX CRC register"] | ||
| 5792 | #[repr(transparent)] | ||
| 5793 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 5794 | pub struct Rxcrcr(pub u32); | ||
| 5795 | impl Rxcrcr { | ||
| 5796 | #[doc = "Rx CRC register"] | ||
| 5797 | pub const fn rx_crc(&self) -> u16 { | ||
| 5798 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 5799 | val as u16 | ||
| 5800 | } | ||
| 5801 | #[doc = "Rx CRC register"] | ||
| 5802 | pub fn set_rx_crc(&mut self, val: u16) { | ||
| 5803 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 5804 | } | ||
| 5805 | } | ||
| 5806 | impl Default for Rxcrcr { | ||
| 5807 | fn default() -> Rxcrcr { | ||
| 5808 | Rxcrcr(0) | ||
| 5809 | } | ||
| 5810 | } | ||
| 5811 | #[doc = "status register"] | ||
| 5812 | #[repr(transparent)] | ||
| 5813 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 5814 | pub struct Sr(pub u32); | ||
| 5815 | impl Sr { | ||
| 5816 | #[doc = "Receive buffer not empty"] | ||
| 5817 | pub const fn rxne(&self) -> bool { | ||
| 5818 | let val = (self.0 >> 0usize) & 0x01; | ||
| 5819 | val != 0 | ||
| 5820 | } | ||
| 5821 | #[doc = "Receive buffer not empty"] | ||
| 5822 | pub fn set_rxne(&mut self, val: bool) { | ||
| 5823 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 5824 | } | ||
| 5825 | #[doc = "Transmit buffer empty"] | ||
| 5826 | pub const fn txe(&self) -> bool { | ||
| 5827 | let val = (self.0 >> 1usize) & 0x01; | ||
| 5828 | val != 0 | ||
| 5829 | } | ||
| 5830 | #[doc = "Transmit buffer empty"] | ||
| 5831 | pub fn set_txe(&mut self, val: bool) { | ||
| 5832 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 5833 | } | ||
| 5834 | #[doc = "CRC error flag"] | ||
| 5835 | pub const fn crcerr(&self) -> bool { | ||
| 5836 | let val = (self.0 >> 4usize) & 0x01; | ||
| 5837 | val != 0 | ||
| 5838 | } | ||
| 5839 | #[doc = "CRC error flag"] | ||
| 5840 | pub fn set_crcerr(&mut self, val: bool) { | ||
| 5841 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | ||
| 5842 | } | ||
| 5843 | #[doc = "Mode fault"] | ||
| 5844 | pub const fn modf(&self) -> bool { | ||
| 5845 | let val = (self.0 >> 5usize) & 0x01; | ||
| 5846 | val != 0 | ||
| 5847 | } | ||
| 5848 | #[doc = "Mode fault"] | ||
| 5849 | pub fn set_modf(&mut self, val: bool) { | ||
| 5850 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | ||
| 5851 | } | ||
| 5852 | #[doc = "Overrun flag"] | ||
| 5853 | pub const fn ovr(&self) -> bool { | ||
| 5854 | let val = (self.0 >> 6usize) & 0x01; | ||
| 5855 | val != 0 | ||
| 5856 | } | ||
| 5857 | #[doc = "Overrun flag"] | ||
| 5858 | pub fn set_ovr(&mut self, val: bool) { | ||
| 5859 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | ||
| 5860 | } | ||
| 5861 | #[doc = "Busy flag"] | ||
| 5862 | pub const fn bsy(&self) -> bool { | ||
| 5863 | let val = (self.0 >> 7usize) & 0x01; | ||
| 5864 | val != 0 | ||
| 5865 | } | ||
| 5866 | #[doc = "Busy flag"] | ||
| 5867 | pub fn set_bsy(&mut self, val: bool) { | ||
| 5868 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 5869 | } | ||
| 5870 | #[doc = "Frame format error"] | ||
| 5871 | pub const fn fre(&self) -> bool { | ||
| 5872 | let val = (self.0 >> 8usize) & 0x01; | ||
| 5873 | val != 0 | ||
| 5874 | } | ||
| 5875 | #[doc = "Frame format error"] | ||
| 5876 | pub fn set_fre(&mut self, val: bool) { | ||
| 5877 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | ||
| 5878 | } | ||
| 5879 | #[doc = "FIFO reception level"] | ||
| 5880 | pub const fn frlvl(&self) -> u8 { | ||
| 5881 | let val = (self.0 >> 9usize) & 0x03; | ||
| 5882 | val as u8 | ||
| 5883 | } | ||
| 5884 | #[doc = "FIFO reception level"] | ||
| 5885 | pub fn set_frlvl(&mut self, val: u8) { | ||
| 5886 | self.0 = (self.0 & !(0x03 << 9usize)) | (((val as u32) & 0x03) << 9usize); | ||
| 5887 | } | ||
| 5888 | #[doc = "FIFO Transmission Level"] | ||
| 5889 | pub const fn ftlvl(&self) -> u8 { | ||
| 5890 | let val = (self.0 >> 11usize) & 0x03; | ||
| 5891 | val as u8 | ||
| 5892 | } | ||
| 5893 | #[doc = "FIFO Transmission Level"] | ||
| 5894 | pub fn set_ftlvl(&mut self, val: u8) { | ||
| 5895 | self.0 = (self.0 & !(0x03 << 11usize)) | (((val as u32) & 0x03) << 11usize); | ||
| 5896 | } | ||
| 5897 | } | ||
| 5898 | impl Default for Sr { | ||
| 5899 | fn default() -> Sr { | ||
| 5900 | Sr(0) | ||
| 5901 | } | ||
| 5902 | } | ||
| 5903 | #[doc = "CRC polynomial register"] | 5522 | #[doc = "CRC polynomial register"] |
| 5904 | #[repr(transparent)] | 5523 | #[repr(transparent)] |
| 5905 | #[derive(Copy, Clone, Eq, PartialEq)] | 5524 | #[derive(Copy, Clone, Eq, PartialEq)] |
| @@ -5921,1778 +5540,329 @@ pub mod spi_v2 { | |||
| 5921 | } | 5540 | } |
| 5922 | } | 5541 | } |
| 5923 | } | 5542 | } |
| 5924 | pub mod vals { | ||
| 5925 | use crate::generic::*; | ||
| 5926 | #[repr(transparent)] | ||
| 5927 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 5928 | pub struct Cpol(pub u8); | ||
| 5929 | impl Cpol { | ||
| 5930 | #[doc = "CK to 0 when idle"] | ||
| 5931 | pub const IDLELOW: Self = Self(0); | ||
| 5932 | #[doc = "CK to 1 when idle"] | ||
| 5933 | pub const IDLEHIGH: Self = Self(0x01); | ||
| 5934 | } | ||
| 5935 | #[repr(transparent)] | ||
| 5936 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 5937 | pub struct LdmaTx(pub u8); | ||
| 5938 | impl LdmaTx { | ||
| 5939 | #[doc = "Number of data to transfer for transmit is even"] | ||
| 5940 | pub const EVEN: Self = Self(0); | ||
| 5941 | #[doc = "Number of data to transfer for transmit is odd"] | ||
| 5942 | pub const ODD: Self = Self(0x01); | ||
| 5943 | } | ||
| 5944 | #[repr(transparent)] | ||
| 5945 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 5946 | pub struct Crcnext(pub u8); | ||
| 5947 | impl Crcnext { | ||
| 5948 | #[doc = "Next transmit value is from Tx buffer"] | ||
| 5949 | pub const TXBUFFER: Self = Self(0); | ||
| 5950 | #[doc = "Next transmit value is from Tx CRC register"] | ||
| 5951 | pub const CRC: Self = Self(0x01); | ||
| 5952 | } | ||
| 5953 | #[repr(transparent)] | ||
| 5954 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 5955 | pub struct Bidimode(pub u8); | ||
| 5956 | impl Bidimode { | ||
| 5957 | #[doc = "2-line unidirectional data mode selected"] | ||
| 5958 | pub const UNIDIRECTIONAL: Self = Self(0); | ||
| 5959 | #[doc = "1-line bidirectional data mode selected"] | ||
| 5960 | pub const BIDIRECTIONAL: Self = Self(0x01); | ||
| 5961 | } | ||
| 5962 | #[repr(transparent)] | ||
| 5963 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 5964 | pub struct Crcl(pub u8); | ||
| 5965 | impl Crcl { | ||
| 5966 | #[doc = "8-bit CRC length"] | ||
| 5967 | pub const EIGHTBIT: Self = Self(0); | ||
| 5968 | #[doc = "16-bit CRC length"] | ||
| 5969 | pub const SIXTEENBIT: Self = Self(0x01); | ||
| 5970 | } | ||
| 5971 | #[repr(transparent)] | ||
| 5972 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 5973 | pub struct Br(pub u8); | ||
| 5974 | impl Br { | ||
| 5975 | #[doc = "f_PCLK / 2"] | ||
| 5976 | pub const DIV2: Self = Self(0); | ||
| 5977 | #[doc = "f_PCLK / 4"] | ||
| 5978 | pub const DIV4: Self = Self(0x01); | ||
| 5979 | #[doc = "f_PCLK / 8"] | ||
| 5980 | pub const DIV8: Self = Self(0x02); | ||
| 5981 | #[doc = "f_PCLK / 16"] | ||
| 5982 | pub const DIV16: Self = Self(0x03); | ||
| 5983 | #[doc = "f_PCLK / 32"] | ||
| 5984 | pub const DIV32: Self = Self(0x04); | ||
| 5985 | #[doc = "f_PCLK / 64"] | ||
| 5986 | pub const DIV64: Self = Self(0x05); | ||
| 5987 | #[doc = "f_PCLK / 128"] | ||
| 5988 | pub const DIV128: Self = Self(0x06); | ||
| 5989 | #[doc = "f_PCLK / 256"] | ||
| 5990 | pub const DIV256: Self = Self(0x07); | ||
| 5991 | } | ||
| 5992 | #[repr(transparent)] | ||
| 5993 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 5994 | pub struct Frxth(pub u8); | ||
| 5995 | impl Frxth { | ||
| 5996 | #[doc = "RXNE event is generated if the FIFO level is greater than or equal to 1/2 (16-bit)"] | ||
| 5997 | pub const HALF: Self = Self(0); | ||
| 5998 | #[doc = "RXNE event is generated if the FIFO level is greater than or equal to 1/4 (8-bit)"] | ||
| 5999 | pub const QUARTER: Self = Self(0x01); | ||
| 6000 | } | ||
| 6001 | #[repr(transparent)] | ||
| 6002 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6003 | pub struct Frer(pub u8); | ||
| 6004 | impl Frer { | ||
| 6005 | #[doc = "No frame format error"] | ||
| 6006 | pub const NOERROR: Self = Self(0); | ||
| 6007 | #[doc = "A frame format error occurred"] | ||
| 6008 | pub const ERROR: Self = Self(0x01); | ||
| 6009 | } | ||
| 6010 | #[repr(transparent)] | ||
| 6011 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6012 | pub struct Lsbfirst(pub u8); | ||
| 6013 | impl Lsbfirst { | ||
| 6014 | #[doc = "Data is transmitted/received with the MSB first"] | ||
| 6015 | pub const MSBFIRST: Self = Self(0); | ||
| 6016 | #[doc = "Data is transmitted/received with the LSB first"] | ||
| 6017 | pub const LSBFIRST: Self = Self(0x01); | ||
| 6018 | } | ||
| 6019 | #[repr(transparent)] | ||
| 6020 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6021 | pub struct Bidioe(pub u8); | ||
| 6022 | impl Bidioe { | ||
| 6023 | #[doc = "Output disabled (receive-only mode)"] | ||
| 6024 | pub const OUTPUTDISABLED: Self = Self(0); | ||
| 6025 | #[doc = "Output enabled (transmit-only mode)"] | ||
| 6026 | pub const OUTPUTENABLED: Self = Self(0x01); | ||
| 6027 | } | ||
| 6028 | #[repr(transparent)] | ||
| 6029 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6030 | pub struct Rxonly(pub u8); | ||
| 6031 | impl Rxonly { | ||
| 6032 | #[doc = "Full duplex (Transmit and receive)"] | ||
| 6033 | pub const FULLDUPLEX: Self = Self(0); | ||
| 6034 | #[doc = "Output disabled (Receive-only mode)"] | ||
| 6035 | pub const OUTPUTDISABLED: Self = Self(0x01); | ||
| 6036 | } | ||
| 6037 | #[repr(transparent)] | ||
| 6038 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6039 | pub struct Cpha(pub u8); | ||
| 6040 | impl Cpha { | ||
| 6041 | #[doc = "The first clock transition is the first data capture edge"] | ||
| 6042 | pub const FIRSTEDGE: Self = Self(0); | ||
| 6043 | #[doc = "The second clock transition is the first data capture edge"] | ||
| 6044 | pub const SECONDEDGE: Self = Self(0x01); | ||
| 6045 | } | ||
| 6046 | #[repr(transparent)] | ||
| 6047 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6048 | pub struct LdmaRx(pub u8); | ||
| 6049 | impl LdmaRx { | ||
| 6050 | #[doc = "Number of data to transfer for receive is even"] | ||
| 6051 | pub const EVEN: Self = Self(0); | ||
| 6052 | #[doc = "Number of data to transfer for receive is odd"] | ||
| 6053 | pub const ODD: Self = Self(0x01); | ||
| 6054 | } | ||
| 6055 | #[repr(transparent)] | ||
| 6056 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6057 | pub struct Frlvlr(pub u8); | ||
| 6058 | impl Frlvlr { | ||
| 6059 | #[doc = "Rx FIFO Empty"] | ||
| 6060 | pub const EMPTY: Self = Self(0); | ||
| 6061 | #[doc = "Rx 1/4 FIFO"] | ||
| 6062 | pub const QUARTER: Self = Self(0x01); | ||
| 6063 | #[doc = "Rx 1/2 FIFO"] | ||
| 6064 | pub const HALF: Self = Self(0x02); | ||
| 6065 | #[doc = "Rx FIFO full"] | ||
| 6066 | pub const FULL: Self = Self(0x03); | ||
| 6067 | } | ||
| 6068 | #[repr(transparent)] | ||
| 6069 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6070 | pub struct Ftlvlr(pub u8); | ||
| 6071 | impl Ftlvlr { | ||
| 6072 | #[doc = "Tx FIFO Empty"] | ||
| 6073 | pub const EMPTY: Self = Self(0); | ||
| 6074 | #[doc = "Tx 1/4 FIFO"] | ||
| 6075 | pub const QUARTER: Self = Self(0x01); | ||
| 6076 | #[doc = "Tx 1/2 FIFO"] | ||
| 6077 | pub const HALF: Self = Self(0x02); | ||
| 6078 | #[doc = "Tx FIFO full"] | ||
| 6079 | pub const FULL: Self = Self(0x03); | ||
| 6080 | } | ||
| 6081 | #[repr(transparent)] | ||
| 6082 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6083 | pub struct Mstr(pub u8); | ||
| 6084 | impl Mstr { | ||
| 6085 | #[doc = "Slave configuration"] | ||
| 6086 | pub const SLAVE: Self = Self(0); | ||
| 6087 | #[doc = "Master configuration"] | ||
| 6088 | pub const MASTER: Self = Self(0x01); | ||
| 6089 | } | ||
| 6090 | #[repr(transparent)] | ||
| 6091 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6092 | pub struct Ds(pub u8); | ||
| 6093 | impl Ds { | ||
| 6094 | #[doc = "4-bit"] | ||
| 6095 | pub const FOURBIT: Self = Self(0x03); | ||
| 6096 | #[doc = "5-bit"] | ||
| 6097 | pub const FIVEBIT: Self = Self(0x04); | ||
| 6098 | #[doc = "6-bit"] | ||
| 6099 | pub const SIXBIT: Self = Self(0x05); | ||
| 6100 | #[doc = "7-bit"] | ||
| 6101 | pub const SEVENBIT: Self = Self(0x06); | ||
| 6102 | #[doc = "8-bit"] | ||
| 6103 | pub const EIGHTBIT: Self = Self(0x07); | ||
| 6104 | #[doc = "9-bit"] | ||
| 6105 | pub const NINEBIT: Self = Self(0x08); | ||
| 6106 | #[doc = "10-bit"] | ||
| 6107 | pub const TENBIT: Self = Self(0x09); | ||
| 6108 | #[doc = "11-bit"] | ||
| 6109 | pub const ELEVENBIT: Self = Self(0x0a); | ||
| 6110 | #[doc = "12-bit"] | ||
| 6111 | pub const TWELVEBIT: Self = Self(0x0b); | ||
| 6112 | #[doc = "13-bit"] | ||
| 6113 | pub const THIRTEENBIT: Self = Self(0x0c); | ||
| 6114 | #[doc = "14-bit"] | ||
| 6115 | pub const FOURTEENBIT: Self = Self(0x0d); | ||
| 6116 | #[doc = "15-bit"] | ||
| 6117 | pub const FIFTEENBIT: Self = Self(0x0e); | ||
| 6118 | #[doc = "16-bit"] | ||
| 6119 | pub const SIXTEENBIT: Self = Self(0x0f); | ||
| 6120 | } | ||
| 6121 | #[repr(transparent)] | ||
| 6122 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6123 | pub struct Frf(pub u8); | ||
| 6124 | impl Frf { | ||
| 6125 | #[doc = "SPI Motorola mode"] | ||
| 6126 | pub const MOTOROLA: Self = Self(0); | ||
| 6127 | #[doc = "SPI TI mode"] | ||
| 6128 | pub const TI: Self = Self(0x01); | ||
| 6129 | } | ||
| 6130 | } | ||
| 6131 | } | 5543 | } |
| 6132 | pub mod syscfg_h7 { | 5544 | pub mod sdmmc_v2 { |
| 6133 | use crate::generic::*; | 5545 | use crate::generic::*; |
| 6134 | #[doc = "System configuration controller"] | 5546 | #[doc = "SDMMC"] |
| 6135 | #[derive(Copy, Clone)] | 5547 | #[derive(Copy, Clone)] |
| 6136 | pub struct Syscfg(pub *mut u8); | 5548 | pub struct Sdmmc(pub *mut u8); |
| 6137 | unsafe impl Send for Syscfg {} | 5549 | unsafe impl Send for Sdmmc {} |
| 6138 | unsafe impl Sync for Syscfg {} | 5550 | unsafe impl Sync for Sdmmc {} |
| 6139 | impl Syscfg { | 5551 | impl Sdmmc { |
| 6140 | #[doc = "peripheral mode configuration register"] | 5552 | #[doc = "SDMMC power control register"] |
| 6141 | pub fn pmcr(self) -> Reg<regs::Pmcr, RW> { | 5553 | pub fn power(self) -> Reg<regs::Power, RW> { |
| 5554 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 5555 | } | ||
| 5556 | #[doc = "The SDMMC_CLKCR register controls the SDMMC_CK output clock, the SDMMC_RX_CLK receive clock, and the bus width."] | ||
| 5557 | pub fn clkcr(self) -> Reg<regs::Clkcr, RW> { | ||
| 6142 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | 5558 | unsafe { Reg::from_ptr(self.0.add(4usize)) } |
| 6143 | } | 5559 | } |
| 6144 | #[doc = "external interrupt configuration register 1"] | 5560 | #[doc = "The SDMMC_ARGR register contains a 32-bit command argument, which is sent to a card as part of a command message."] |
| 6145 | pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> { | 5561 | pub fn argr(self) -> Reg<regs::Argr, RW> { |
| 6146 | assert!(n < 4usize); | 5562 | unsafe { Reg::from_ptr(self.0.add(8usize)) } |
| 6147 | unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) } | ||
| 6148 | } | 5563 | } |
| 6149 | #[doc = "compensation cell control/status register"] | 5564 | #[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)."] |
| 6150 | pub fn cccsr(self) -> Reg<regs::Cccsr, RW> { | 5565 | pub fn cmdr(self) -> Reg<regs::Cmdr, RW> { |
| 6151 | unsafe { Reg::from_ptr(self.0.add(32usize)) } | 5566 | unsafe { Reg::from_ptr(self.0.add(12usize)) } |
| 6152 | } | 5567 | } |
| 6153 | #[doc = "SYSCFG compensation cell value register"] | 5568 | #[doc = "SDMMC command response register"] |
| 6154 | pub fn ccvr(self) -> Reg<regs::Ccvr, R> { | 5569 | pub fn respcmdr(self) -> Reg<regs::Respcmdr, R> { |
| 5570 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 5571 | } | ||
| 5572 | #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] | ||
| 5573 | pub fn respr(self, n: usize) -> Reg<regs::Resp1r, R> { | ||
| 5574 | assert!(n < 4usize); | ||
| 5575 | unsafe { Reg::from_ptr(self.0.add(20usize + n * 4usize)) } | ||
| 5576 | } | ||
| 5577 | #[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."] | ||
| 5578 | pub fn dtimer(self) -> Reg<regs::Dtimer, RW> { | ||
| 6155 | unsafe { Reg::from_ptr(self.0.add(36usize)) } | 5579 | unsafe { Reg::from_ptr(self.0.add(36usize)) } |
| 6156 | } | 5580 | } |
| 6157 | #[doc = "SYSCFG compensation cell code register"] | 5581 | #[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."] |
| 6158 | pub fn cccr(self) -> Reg<regs::Cccr, RW> { | 5582 | pub fn dlenr(self) -> Reg<regs::Dlenr, RW> { |
| 6159 | unsafe { Reg::from_ptr(self.0.add(40usize)) } | 5583 | unsafe { Reg::from_ptr(self.0.add(40usize)) } |
| 6160 | } | 5584 | } |
| 6161 | #[doc = "SYSCFG power control register"] | 5585 | #[doc = "The SDMMC_DCTRL register control the data path state machine (DPSM)."] |
| 6162 | pub fn pwrcr(self) -> Reg<regs::Pwrcr, RW> { | 5586 | pub fn dctrl(self) -> Reg<regs::Dctrl, RW> { |
| 6163 | unsafe { Reg::from_ptr(self.0.add(44usize)) } | 5587 | unsafe { Reg::from_ptr(self.0.add(44usize)) } |
| 6164 | } | 5588 | } |
| 6165 | #[doc = "SYSCFG package register"] | 5589 | #[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."] |
| 6166 | pub fn pkgr(self) -> Reg<regs::Pkgr, R> { | 5590 | pub fn dcntr(self) -> Reg<regs::Dcntr, R> { |
| 6167 | unsafe { Reg::from_ptr(self.0.add(292usize)) } | 5591 | unsafe { Reg::from_ptr(self.0.add(48usize)) } |
| 6168 | } | ||
| 6169 | #[doc = "SYSCFG user register 0"] | ||
| 6170 | pub fn ur0(self) -> Reg<regs::Ur0, R> { | ||
| 6171 | unsafe { Reg::from_ptr(self.0.add(768usize)) } | ||
| 6172 | } | ||
| 6173 | #[doc = "SYSCFG user register 2"] | ||
| 6174 | pub fn ur2(self) -> Reg<regs::Ur2, RW> { | ||
| 6175 | unsafe { Reg::from_ptr(self.0.add(776usize)) } | ||
| 6176 | } | ||
| 6177 | #[doc = "SYSCFG user register 3"] | ||
| 6178 | pub fn ur3(self) -> Reg<regs::Ur3, RW> { | ||
| 6179 | unsafe { Reg::from_ptr(self.0.add(780usize)) } | ||
| 6180 | } | ||
| 6181 | #[doc = "SYSCFG user register 4"] | ||
| 6182 | pub fn ur4(self) -> Reg<regs::Ur4, R> { | ||
| 6183 | unsafe { Reg::from_ptr(self.0.add(784usize)) } | ||
| 6184 | } | ||
| 6185 | #[doc = "SYSCFG user register 5"] | ||
| 6186 | pub fn ur5(self) -> Reg<regs::Ur5, R> { | ||
| 6187 | unsafe { Reg::from_ptr(self.0.add(788usize)) } | ||
| 6188 | } | ||
| 6189 | #[doc = "SYSCFG user register 6"] | ||
| 6190 | pub fn ur6(self) -> Reg<regs::Ur6, R> { | ||
| 6191 | unsafe { Reg::from_ptr(self.0.add(792usize)) } | ||
| 6192 | } | 5592 | } |
| 6193 | #[doc = "SYSCFG user register 7"] | 5593 | #[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)"] |
| 6194 | pub fn ur7(self) -> Reg<regs::Ur7, R> { | 5594 | pub fn star(self) -> Reg<regs::Star, R> { |
| 6195 | unsafe { Reg::from_ptr(self.0.add(796usize)) } | 5595 | unsafe { Reg::from_ptr(self.0.add(52usize)) } |
| 6196 | } | 5596 | } |
| 6197 | #[doc = "SYSCFG user register 8"] | 5597 | #[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."] |
| 6198 | pub fn ur8(self) -> Reg<regs::Ur8, R> { | 5598 | pub fn icr(self) -> Reg<regs::Icr, RW> { |
| 6199 | unsafe { Reg::from_ptr(self.0.add(800usize)) } | 5599 | unsafe { Reg::from_ptr(self.0.add(56usize)) } |
| 6200 | } | 5600 | } |
| 6201 | #[doc = "SYSCFG user register 9"] | 5601 | #[doc = "The interrupt mask register determines which status flags generate an interrupt request by setting the corresponding bit to 1."] |
| 6202 | pub fn ur9(self) -> Reg<regs::Ur9, R> { | 5602 | pub fn maskr(self) -> Reg<regs::Maskr, RW> { |
| 6203 | unsafe { Reg::from_ptr(self.0.add(804usize)) } | 5603 | unsafe { Reg::from_ptr(self.0.add(60usize)) } |
| 6204 | } | 5604 | } |
| 6205 | #[doc = "SYSCFG user register 10"] | 5605 | #[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."] |
| 6206 | pub fn ur10(self) -> Reg<regs::Ur10, R> { | 5606 | pub fn acktimer(self) -> Reg<regs::Acktimer, RW> { |
| 6207 | unsafe { Reg::from_ptr(self.0.add(808usize)) } | 5607 | unsafe { Reg::from_ptr(self.0.add(64usize)) } |
| 6208 | } | 5608 | } |
| 6209 | #[doc = "SYSCFG user register 11"] | 5609 | #[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."] |
| 6210 | pub fn ur11(self) -> Reg<regs::Ur11, R> { | 5610 | pub fn idmactrlr(self) -> Reg<regs::Idmactrlr, RW> { |
| 6211 | unsafe { Reg::from_ptr(self.0.add(812usize)) } | 5611 | unsafe { Reg::from_ptr(self.0.add(80usize)) } |
| 6212 | } | 5612 | } |
| 6213 | #[doc = "SYSCFG user register 12"] | 5613 | #[doc = "The SDMMC_IDMABSIZER register contains the buffers size when in double buffer configuration."] |
| 6214 | pub fn ur12(self) -> Reg<regs::Ur12, R> { | 5614 | pub fn idmabsizer(self) -> Reg<regs::Idmabsizer, RW> { |
| 6215 | unsafe { Reg::from_ptr(self.0.add(816usize)) } | 5615 | unsafe { Reg::from_ptr(self.0.add(84usize)) } |
| 6216 | } | 5616 | } |
| 6217 | #[doc = "SYSCFG user register 13"] | 5617 | #[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."] |
| 6218 | pub fn ur13(self) -> Reg<regs::Ur13, R> { | 5618 | pub fn idmabase0r(self) -> Reg<regs::Idmabase0r, RW> { |
| 6219 | unsafe { Reg::from_ptr(self.0.add(820usize)) } | 5619 | unsafe { Reg::from_ptr(self.0.add(88usize)) } |
| 6220 | } | 5620 | } |
| 6221 | #[doc = "SYSCFG user register 14"] | 5621 | #[doc = "The SDMMC_IDMABASE1R register contains the double buffer configuration second buffer memory base address."] |
| 6222 | pub fn ur14(self) -> Reg<regs::Ur14, RW> { | 5622 | pub fn idmabase1r(self) -> Reg<regs::Idmabase1r, RW> { |
| 6223 | unsafe { Reg::from_ptr(self.0.add(824usize)) } | 5623 | unsafe { Reg::from_ptr(self.0.add(92usize)) } |
| 6224 | } | 5624 | } |
| 6225 | #[doc = "SYSCFG user register 15"] | 5625 | #[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."] |
| 6226 | pub fn ur15(self) -> Reg<regs::Ur15, R> { | 5626 | pub fn fifor(self) -> Reg<regs::Fifor, RW> { |
| 6227 | unsafe { Reg::from_ptr(self.0.add(828usize)) } | 5627 | unsafe { Reg::from_ptr(self.0.add(128usize)) } |
| 6228 | } | 5628 | } |
| 6229 | #[doc = "SYSCFG user register 16"] | 5629 | #[doc = "SDMMC IP version register"] |
| 6230 | pub fn ur16(self) -> Reg<regs::Ur16, R> { | 5630 | pub fn ver(self) -> Reg<regs::Ver, R> { |
| 6231 | unsafe { Reg::from_ptr(self.0.add(832usize)) } | 5631 | unsafe { Reg::from_ptr(self.0.add(1012usize)) } |
| 6232 | } | 5632 | } |
| 6233 | #[doc = "SYSCFG user register 17"] | 5633 | #[doc = "SDMMC IP identification register"] |
| 6234 | pub fn ur17(self) -> Reg<regs::Ur17, R> { | 5634 | pub fn id(self) -> Reg<regs::Id, R> { |
| 6235 | unsafe { Reg::from_ptr(self.0.add(836usize)) } | 5635 | unsafe { Reg::from_ptr(self.0.add(1016usize)) } |
| 6236 | } | 5636 | } |
| 6237 | } | 5637 | } |
| 6238 | pub mod regs { | 5638 | pub mod regs { |
| 6239 | use crate::generic::*; | 5639 | use crate::generic::*; |
| 6240 | #[doc = "SYSCFG user register 0"] | 5640 | #[doc = "The SDMMC_DCTRL register control the data path state machine (DPSM)."] |
| 6241 | #[repr(transparent)] | ||
| 6242 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6243 | pub struct Ur0(pub u32); | ||
| 6244 | impl Ur0 { | ||
| 6245 | #[doc = "Bank Swap"] | ||
| 6246 | pub const fn bks(&self) -> bool { | ||
| 6247 | let val = (self.0 >> 0usize) & 0x01; | ||
| 6248 | val != 0 | ||
| 6249 | } | ||
| 6250 | #[doc = "Bank Swap"] | ||
| 6251 | pub fn set_bks(&mut self, val: bool) { | ||
| 6252 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 6253 | } | ||
| 6254 | #[doc = "Readout protection"] | ||
| 6255 | pub const fn rdp(&self) -> u8 { | ||
| 6256 | let val = (self.0 >> 16usize) & 0xff; | ||
| 6257 | val as u8 | ||
| 6258 | } | ||
| 6259 | #[doc = "Readout protection"] | ||
| 6260 | pub fn set_rdp(&mut self, val: u8) { | ||
| 6261 | self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); | ||
| 6262 | } | ||
| 6263 | } | ||
| 6264 | impl Default for Ur0 { | ||
| 6265 | fn default() -> Ur0 { | ||
| 6266 | Ur0(0) | ||
| 6267 | } | ||
| 6268 | } | ||
| 6269 | #[doc = "SYSCFG user register 10"] | ||
| 6270 | #[repr(transparent)] | ||
| 6271 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6272 | pub struct Ur10(pub u32); | ||
| 6273 | impl Ur10 { | ||
| 6274 | #[doc = "Protected area end address for bank 2"] | ||
| 6275 | pub const fn pa_end_2(&self) -> u16 { | ||
| 6276 | let val = (self.0 >> 0usize) & 0x0fff; | ||
| 6277 | val as u16 | ||
| 6278 | } | ||
| 6279 | #[doc = "Protected area end address for bank 2"] | ||
| 6280 | pub fn set_pa_end_2(&mut self, val: u16) { | ||
| 6281 | self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); | ||
| 6282 | } | ||
| 6283 | #[doc = "Secured area start address for bank 2"] | ||
| 6284 | pub const fn sa_beg_2(&self) -> u16 { | ||
| 6285 | let val = (self.0 >> 16usize) & 0x0fff; | ||
| 6286 | val as u16 | ||
| 6287 | } | ||
| 6288 | #[doc = "Secured area start address for bank 2"] | ||
| 6289 | pub fn set_sa_beg_2(&mut self, val: u16) { | ||
| 6290 | self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); | ||
| 6291 | } | ||
| 6292 | } | ||
| 6293 | impl Default for Ur10 { | ||
| 6294 | fn default() -> Ur10 { | ||
| 6295 | Ur10(0) | ||
| 6296 | } | ||
| 6297 | } | ||
| 6298 | #[doc = "SYSCFG user register 2"] | ||
| 6299 | #[repr(transparent)] | ||
| 6300 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6301 | pub struct Ur2(pub u32); | ||
| 6302 | impl Ur2 { | ||
| 6303 | #[doc = "BOR_LVL Brownout Reset Threshold Level"] | ||
| 6304 | pub const fn borh(&self) -> u8 { | ||
| 6305 | let val = (self.0 >> 0usize) & 0x03; | ||
| 6306 | val as u8 | ||
| 6307 | } | ||
| 6308 | #[doc = "BOR_LVL Brownout Reset Threshold Level"] | ||
| 6309 | pub fn set_borh(&mut self, val: u8) { | ||
| 6310 | self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); | ||
| 6311 | } | ||
| 6312 | #[doc = "Boot Address 0"] | ||
| 6313 | pub const fn boot_add0(&self) -> u16 { | ||
| 6314 | let val = (self.0 >> 16usize) & 0xffff; | ||
| 6315 | val as u16 | ||
| 6316 | } | ||
| 6317 | #[doc = "Boot Address 0"] | ||
| 6318 | pub fn set_boot_add0(&mut self, val: u16) { | ||
| 6319 | self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize); | ||
| 6320 | } | ||
| 6321 | } | ||
| 6322 | impl Default for Ur2 { | ||
| 6323 | fn default() -> Ur2 { | ||
| 6324 | Ur2(0) | ||
| 6325 | } | ||
| 6326 | } | ||
| 6327 | #[doc = "SYSCFG compensation cell value register"] | ||
| 6328 | #[repr(transparent)] | ||
| 6329 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6330 | pub struct Ccvr(pub u32); | ||
| 6331 | impl Ccvr { | ||
| 6332 | #[doc = "NMOS compensation value"] | ||
| 6333 | pub const fn ncv(&self) -> u8 { | ||
| 6334 | let val = (self.0 >> 0usize) & 0x0f; | ||
| 6335 | val as u8 | ||
| 6336 | } | ||
| 6337 | #[doc = "NMOS compensation value"] | ||
| 6338 | pub fn set_ncv(&mut self, val: u8) { | ||
| 6339 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); | ||
| 6340 | } | ||
| 6341 | #[doc = "PMOS compensation value"] | ||
| 6342 | pub const fn pcv(&self) -> u8 { | ||
| 6343 | let val = (self.0 >> 4usize) & 0x0f; | ||
| 6344 | val as u8 | ||
| 6345 | } | ||
| 6346 | #[doc = "PMOS compensation value"] | ||
| 6347 | pub fn set_pcv(&mut self, val: u8) { | ||
| 6348 | self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); | ||
| 6349 | } | ||
| 6350 | } | ||
| 6351 | impl Default for Ccvr { | ||
| 6352 | fn default() -> Ccvr { | ||
| 6353 | Ccvr(0) | ||
| 6354 | } | ||
| 6355 | } | ||
| 6356 | #[doc = "compensation cell control/status register"] | ||
| 6357 | #[repr(transparent)] | 5641 | #[repr(transparent)] |
| 6358 | #[derive(Copy, Clone, Eq, PartialEq)] | 5642 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 6359 | pub struct Cccsr(pub u32); | 5643 | pub struct Dctrl(pub u32); |
| 6360 | impl Cccsr { | 5644 | impl Dctrl { |
| 6361 | #[doc = "enable"] | 5645 | #[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."] |
| 6362 | pub const fn en(&self) -> bool { | 5646 | pub const fn dten(&self) -> bool { |
| 6363 | let val = (self.0 >> 0usize) & 0x01; | 5647 | let val = (self.0 >> 0usize) & 0x01; |
| 6364 | val != 0 | 5648 | val != 0 |
| 6365 | } | 5649 | } |
| 6366 | #[doc = "enable"] | 5650 | #[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."] |
| 6367 | pub fn set_en(&mut self, val: bool) { | 5651 | pub fn set_dten(&mut self, val: bool) { |
| 6368 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 5652 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 6369 | } | 5653 | } |
| 6370 | #[doc = "Code selection"] | 5654 | #[doc = "Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 6371 | pub const fn cs(&self) -> bool { | 5655 | pub const fn dtdir(&self) -> bool { |
| 6372 | let val = (self.0 >> 1usize) & 0x01; | 5656 | let val = (self.0 >> 1usize) & 0x01; |
| 6373 | val != 0 | 5657 | val != 0 |
| 6374 | } | 5658 | } |
| 6375 | #[doc = "Code selection"] | 5659 | #[doc = "Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 6376 | pub fn set_cs(&mut self, val: bool) { | 5660 | pub fn set_dtdir(&mut self, val: bool) { |
| 6377 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 5661 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 6378 | } | 5662 | } |
| 6379 | #[doc = "Compensation cell ready flag"] | 5663 | #[doc = "Data transfer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 6380 | pub const fn ready(&self) -> bool { | 5664 | pub const fn dtmode(&self) -> u8 { |
| 6381 | let val = (self.0 >> 8usize) & 0x01; | 5665 | let val = (self.0 >> 2usize) & 0x03; |
| 6382 | val != 0 | ||
| 6383 | } | ||
| 6384 | #[doc = "Compensation cell ready flag"] | ||
| 6385 | pub fn set_ready(&mut self, val: bool) { | ||
| 6386 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | ||
| 6387 | } | ||
| 6388 | #[doc = "High-speed at low-voltage"] | ||
| 6389 | pub const fn hslv(&self) -> bool { | ||
| 6390 | let val = (self.0 >> 16usize) & 0x01; | ||
| 6391 | val != 0 | ||
| 6392 | } | ||
| 6393 | #[doc = "High-speed at low-voltage"] | ||
| 6394 | pub fn set_hslv(&mut self, val: bool) { | ||
| 6395 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | ||
| 6396 | } | ||
| 6397 | } | ||
| 6398 | impl Default for Cccsr { | ||
| 6399 | fn default() -> Cccsr { | ||
| 6400 | Cccsr(0) | ||
| 6401 | } | ||
| 6402 | } | ||
| 6403 | #[doc = "external interrupt configuration register 2"] | ||
| 6404 | #[repr(transparent)] | ||
| 6405 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6406 | pub struct Exticr(pub u32); | ||
| 6407 | impl Exticr { | ||
| 6408 | #[doc = "EXTI x configuration (x = 4 to 7)"] | ||
| 6409 | pub fn exti(&self, n: usize) -> u8 { | ||
| 6410 | assert!(n < 4usize); | ||
| 6411 | let offs = 0usize + n * 4usize; | ||
| 6412 | let val = (self.0 >> offs) & 0x0f; | ||
| 6413 | val as u8 | ||
| 6414 | } | ||
| 6415 | #[doc = "EXTI x configuration (x = 4 to 7)"] | ||
| 6416 | pub fn set_exti(&mut self, n: usize, val: u8) { | ||
| 6417 | assert!(n < 4usize); | ||
| 6418 | let offs = 0usize + n * 4usize; | ||
| 6419 | self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs); | ||
| 6420 | } | ||
| 6421 | } | ||
| 6422 | impl Default for Exticr { | ||
| 6423 | fn default() -> Exticr { | ||
| 6424 | Exticr(0) | ||
| 6425 | } | ||
| 6426 | } | ||
| 6427 | #[doc = "SYSCFG user register 9"] | ||
| 6428 | #[repr(transparent)] | ||
| 6429 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6430 | pub struct Ur9(pub u32); | ||
| 6431 | impl Ur9 { | ||
| 6432 | #[doc = "Write protection for flash bank 2"] | ||
| 6433 | pub const fn wrpn_2(&self) -> u8 { | ||
| 6434 | let val = (self.0 >> 0usize) & 0xff; | ||
| 6435 | val as u8 | ||
| 6436 | } | ||
| 6437 | #[doc = "Write protection for flash bank 2"] | ||
| 6438 | pub fn set_wrpn_2(&mut self, val: u8) { | ||
| 6439 | self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); | ||
| 6440 | } | ||
| 6441 | #[doc = "Protected area start address for bank 2"] | ||
| 6442 | pub const fn pa_beg_2(&self) -> u16 { | ||
| 6443 | let val = (self.0 >> 16usize) & 0x0fff; | ||
| 6444 | val as u16 | ||
| 6445 | } | ||
| 6446 | #[doc = "Protected area start address for bank 2"] | ||
| 6447 | pub fn set_pa_beg_2(&mut self, val: u16) { | ||
| 6448 | self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); | ||
| 6449 | } | ||
| 6450 | } | ||
| 6451 | impl Default for Ur9 { | ||
| 6452 | fn default() -> Ur9 { | ||
| 6453 | Ur9(0) | ||
| 6454 | } | ||
| 6455 | } | ||
| 6456 | #[doc = "SYSCFG user register 16"] | ||
| 6457 | #[repr(transparent)] | ||
| 6458 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6459 | pub struct Ur16(pub u32); | ||
| 6460 | impl Ur16 { | ||
| 6461 | #[doc = "Freeze independent watchdog in Stop mode"] | ||
| 6462 | pub const fn fziwdgstp(&self) -> bool { | ||
| 6463 | let val = (self.0 >> 0usize) & 0x01; | ||
| 6464 | val != 0 | ||
| 6465 | } | ||
| 6466 | #[doc = "Freeze independent watchdog in Stop mode"] | ||
| 6467 | pub fn set_fziwdgstp(&mut self, val: bool) { | ||
| 6468 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 6469 | } | ||
| 6470 | #[doc = "Private key programmed"] | ||
| 6471 | pub const fn pkp(&self) -> bool { | ||
| 6472 | let val = (self.0 >> 16usize) & 0x01; | ||
| 6473 | val != 0 | ||
| 6474 | } | ||
| 6475 | #[doc = "Private key programmed"] | ||
| 6476 | pub fn set_pkp(&mut self, val: bool) { | ||
| 6477 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | ||
| 6478 | } | ||
| 6479 | } | ||
| 6480 | impl Default for Ur16 { | ||
| 6481 | fn default() -> Ur16 { | ||
| 6482 | Ur16(0) | ||
| 6483 | } | ||
| 6484 | } | ||
| 6485 | #[doc = "SYSCFG compensation cell code register"] | ||
| 6486 | #[repr(transparent)] | ||
| 6487 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6488 | pub struct Cccr(pub u32); | ||
| 6489 | impl Cccr { | ||
| 6490 | #[doc = "NMOS compensation code"] | ||
| 6491 | pub const fn ncc(&self) -> u8 { | ||
| 6492 | let val = (self.0 >> 0usize) & 0x0f; | ||
| 6493 | val as u8 | 5666 | val as u8 |
| 6494 | } | 5667 | } |
| 6495 | #[doc = "NMOS compensation code"] | 5668 | #[doc = "Data transfer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 6496 | pub fn set_ncc(&mut self, val: u8) { | 5669 | pub fn set_dtmode(&mut self, val: u8) { |
| 6497 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); | 5670 | self.0 = (self.0 & !(0x03 << 2usize)) | (((val as u32) & 0x03) << 2usize); |
| 6498 | } | 5671 | } |
| 6499 | #[doc = "PMOS compensation code"] | 5672 | #[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)"] |
| 6500 | pub const fn pcc(&self) -> u8 { | 5673 | pub const fn dblocksize(&self) -> u8 { |
| 6501 | let val = (self.0 >> 4usize) & 0x0f; | 5674 | let val = (self.0 >> 4usize) & 0x0f; |
| 6502 | val as u8 | 5675 | val as u8 |
| 6503 | } | 5676 | } |
| 6504 | #[doc = "PMOS compensation code"] | 5677 | #[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)"] |
| 6505 | pub fn set_pcc(&mut self, val: u8) { | 5678 | pub fn set_dblocksize(&mut self, val: u8) { |
| 6506 | self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); | 5679 | self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); |
| 6507 | } | 5680 | } |
| 6508 | } | 5681 | #[doc = "Read wait start. If this bit is set, read wait operation starts."] |
| 6509 | impl Default for Cccr { | 5682 | pub const fn rwstart(&self) -> bool { |
| 6510 | fn default() -> Cccr { | ||
| 6511 | Cccr(0) | ||
| 6512 | } | ||
| 6513 | } | ||
| 6514 | #[doc = "SYSCFG user register 11"] | ||
| 6515 | #[repr(transparent)] | ||
| 6516 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6517 | pub struct Ur11(pub u32); | ||
| 6518 | impl Ur11 { | ||
| 6519 | #[doc = "Secured area end address for bank 2"] | ||
| 6520 | pub const fn sa_end_2(&self) -> u16 { | ||
| 6521 | let val = (self.0 >> 0usize) & 0x0fff; | ||
| 6522 | val as u16 | ||
| 6523 | } | ||
| 6524 | #[doc = "Secured area end address for bank 2"] | ||
| 6525 | pub fn set_sa_end_2(&mut self, val: u16) { | ||
| 6526 | self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); | ||
| 6527 | } | ||
| 6528 | #[doc = "Independent Watchdog 1 mode"] | ||
| 6529 | pub const fn iwdg1m(&self) -> bool { | ||
| 6530 | let val = (self.0 >> 16usize) & 0x01; | ||
| 6531 | val != 0 | ||
| 6532 | } | ||
| 6533 | #[doc = "Independent Watchdog 1 mode"] | ||
| 6534 | pub fn set_iwdg1m(&mut self, val: bool) { | ||
| 6535 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | ||
| 6536 | } | ||
| 6537 | } | ||
| 6538 | impl Default for Ur11 { | ||
| 6539 | fn default() -> Ur11 { | ||
| 6540 | Ur11(0) | ||
| 6541 | } | ||
| 6542 | } | ||
| 6543 | #[doc = "SYSCFG user register 17"] | ||
| 6544 | #[repr(transparent)] | ||
| 6545 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6546 | pub struct Ur17(pub u32); | ||
| 6547 | impl Ur17 { | ||
| 6548 | #[doc = "I/O high speed / low voltage"] | ||
| 6549 | pub const fn io_hslv(&self) -> bool { | ||
| 6550 | let val = (self.0 >> 0usize) & 0x01; | ||
| 6551 | val != 0 | ||
| 6552 | } | ||
| 6553 | #[doc = "I/O high speed / low voltage"] | ||
| 6554 | pub fn set_io_hslv(&mut self, val: bool) { | ||
| 6555 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 6556 | } | ||
| 6557 | } | ||
| 6558 | impl Default for Ur17 { | ||
| 6559 | fn default() -> Ur17 { | ||
| 6560 | Ur17(0) | ||
| 6561 | } | ||
| 6562 | } | ||
| 6563 | #[doc = "SYSCFG user register 6"] | ||
| 6564 | #[repr(transparent)] | ||
| 6565 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6566 | pub struct Ur6(pub u32); | ||
| 6567 | impl Ur6 { | ||
| 6568 | #[doc = "Protected area start address for bank 1"] | ||
| 6569 | pub const fn pa_beg_1(&self) -> u16 { | ||
| 6570 | let val = (self.0 >> 0usize) & 0x0fff; | ||
| 6571 | val as u16 | ||
| 6572 | } | ||
| 6573 | #[doc = "Protected area start address for bank 1"] | ||
| 6574 | pub fn set_pa_beg_1(&mut self, val: u16) { | ||
| 6575 | self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); | ||
| 6576 | } | ||
| 6577 | #[doc = "Protected area end address for bank 1"] | ||
| 6578 | pub const fn pa_end_1(&self) -> u16 { | ||
| 6579 | let val = (self.0 >> 16usize) & 0x0fff; | ||
| 6580 | val as u16 | ||
| 6581 | } | ||
| 6582 | #[doc = "Protected area end address for bank 1"] | ||
| 6583 | pub fn set_pa_end_1(&mut self, val: u16) { | ||
| 6584 | self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); | ||
| 6585 | } | ||
| 6586 | } | ||
| 6587 | impl Default for Ur6 { | ||
| 6588 | fn default() -> Ur6 { | ||
| 6589 | Ur6(0) | ||
| 6590 | } | ||
| 6591 | } | ||
| 6592 | #[doc = "SYSCFG user register 4"] | ||
| 6593 | #[repr(transparent)] | ||
| 6594 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6595 | pub struct Ur4(pub u32); | ||
| 6596 | impl Ur4 { | ||
| 6597 | #[doc = "Mass Erase Protected Area Disabled for bank 1"] | ||
| 6598 | pub const fn mepad_1(&self) -> bool { | ||
| 6599 | let val = (self.0 >> 16usize) & 0x01; | ||
| 6600 | val != 0 | ||
| 6601 | } | ||
| 6602 | #[doc = "Mass Erase Protected Area Disabled for bank 1"] | ||
| 6603 | pub fn set_mepad_1(&mut self, val: bool) { | ||
| 6604 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | ||
| 6605 | } | ||
| 6606 | } | ||
| 6607 | impl Default for Ur4 { | ||
| 6608 | fn default() -> Ur4 { | ||
| 6609 | Ur4(0) | ||
| 6610 | } | ||
| 6611 | } | ||
| 6612 | #[doc = "SYSCFG user register 5"] | ||
| 6613 | #[repr(transparent)] | ||
| 6614 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6615 | pub struct Ur5(pub u32); | ||
| 6616 | impl Ur5 { | ||
| 6617 | #[doc = "Mass erase secured area disabled for bank 1"] | ||
| 6618 | pub const fn mesad_1(&self) -> bool { | ||
| 6619 | let val = (self.0 >> 0usize) & 0x01; | ||
| 6620 | val != 0 | ||
| 6621 | } | ||
| 6622 | #[doc = "Mass erase secured area disabled for bank 1"] | ||
| 6623 | pub fn set_mesad_1(&mut self, val: bool) { | ||
| 6624 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 6625 | } | ||
| 6626 | #[doc = "Write protection for flash bank 1"] | ||
| 6627 | pub const fn wrpn_1(&self) -> u8 { | ||
| 6628 | let val = (self.0 >> 16usize) & 0xff; | ||
| 6629 | val as u8 | ||
| 6630 | } | ||
| 6631 | #[doc = "Write protection for flash bank 1"] | ||
| 6632 | pub fn set_wrpn_1(&mut self, val: u8) { | ||
| 6633 | self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); | ||
| 6634 | } | ||
| 6635 | } | ||
| 6636 | impl Default for Ur5 { | ||
| 6637 | fn default() -> Ur5 { | ||
| 6638 | Ur5(0) | ||
| 6639 | } | ||
| 6640 | } | ||
| 6641 | #[doc = "SYSCFG package register"] | ||
| 6642 | #[repr(transparent)] | ||
| 6643 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6644 | pub struct Pkgr(pub u32); | ||
| 6645 | impl Pkgr { | ||
| 6646 | #[doc = "Package"] | ||
| 6647 | pub const fn pkg(&self) -> u8 { | ||
| 6648 | let val = (self.0 >> 0usize) & 0x0f; | ||
| 6649 | val as u8 | ||
| 6650 | } | ||
| 6651 | #[doc = "Package"] | ||
| 6652 | pub fn set_pkg(&mut self, val: u8) { | ||
| 6653 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); | ||
| 6654 | } | ||
| 6655 | } | ||
| 6656 | impl Default for Pkgr { | ||
| 6657 | fn default() -> Pkgr { | ||
| 6658 | Pkgr(0) | ||
| 6659 | } | ||
| 6660 | } | ||
| 6661 | #[doc = "SYSCFG user register 13"] | ||
| 6662 | #[repr(transparent)] | ||
| 6663 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6664 | pub struct Ur13(pub u32); | ||
| 6665 | impl Ur13 { | ||
| 6666 | #[doc = "Secured DTCM RAM Size"] | ||
| 6667 | pub const fn sdrs(&self) -> u8 { | ||
| 6668 | let val = (self.0 >> 0usize) & 0x03; | ||
| 6669 | val as u8 | ||
| 6670 | } | ||
| 6671 | #[doc = "Secured DTCM RAM Size"] | ||
| 6672 | pub fn set_sdrs(&mut self, val: u8) { | ||
| 6673 | self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); | ||
| 6674 | } | ||
| 6675 | #[doc = "D1 Standby reset"] | ||
| 6676 | pub const fn d1sbrst(&self) -> bool { | ||
| 6677 | let val = (self.0 >> 16usize) & 0x01; | ||
| 6678 | val != 0 | ||
| 6679 | } | ||
| 6680 | #[doc = "D1 Standby reset"] | ||
| 6681 | pub fn set_d1sbrst(&mut self, val: bool) { | ||
| 6682 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | ||
| 6683 | } | ||
| 6684 | } | ||
| 6685 | impl Default for Ur13 { | ||
| 6686 | fn default() -> Ur13 { | ||
| 6687 | Ur13(0) | ||
| 6688 | } | ||
| 6689 | } | ||
| 6690 | #[doc = "peripheral mode configuration register"] | ||
| 6691 | #[repr(transparent)] | ||
| 6692 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6693 | pub struct Pmcr(pub u32); | ||
| 6694 | impl Pmcr { | ||
| 6695 | #[doc = "I2C1 Fm+"] | ||
| 6696 | pub const fn i2c1fmp(&self) -> bool { | ||
| 6697 | let val = (self.0 >> 0usize) & 0x01; | ||
| 6698 | val != 0 | ||
| 6699 | } | ||
| 6700 | #[doc = "I2C1 Fm+"] | ||
| 6701 | pub fn set_i2c1fmp(&mut self, val: bool) { | ||
| 6702 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 6703 | } | ||
| 6704 | #[doc = "I2C2 Fm+"] | ||
| 6705 | pub const fn i2c2fmp(&self) -> bool { | ||
| 6706 | let val = (self.0 >> 1usize) & 0x01; | ||
| 6707 | val != 0 | ||
| 6708 | } | ||
| 6709 | #[doc = "I2C2 Fm+"] | ||
| 6710 | pub fn set_i2c2fmp(&mut self, val: bool) { | ||
| 6711 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 6712 | } | ||
| 6713 | #[doc = "I2C3 Fm+"] | ||
| 6714 | pub const fn i2c3fmp(&self) -> bool { | ||
| 6715 | let val = (self.0 >> 2usize) & 0x01; | ||
| 6716 | val != 0 | ||
| 6717 | } | ||
| 6718 | #[doc = "I2C3 Fm+"] | ||
| 6719 | pub fn set_i2c3fmp(&mut self, val: bool) { | ||
| 6720 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | ||
| 6721 | } | ||
| 6722 | #[doc = "I2C4 Fm+"] | ||
| 6723 | pub const fn i2c4fmp(&self) -> bool { | ||
| 6724 | let val = (self.0 >> 3usize) & 0x01; | ||
| 6725 | val != 0 | ||
| 6726 | } | ||
| 6727 | #[doc = "I2C4 Fm+"] | ||
| 6728 | pub fn set_i2c4fmp(&mut self, val: bool) { | ||
| 6729 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | ||
| 6730 | } | ||
| 6731 | #[doc = "PB(6) Fm+"] | ||
| 6732 | pub const fn pb6fmp(&self) -> bool { | ||
| 6733 | let val = (self.0 >> 4usize) & 0x01; | ||
| 6734 | val != 0 | ||
| 6735 | } | ||
| 6736 | #[doc = "PB(6) Fm+"] | ||
| 6737 | pub fn set_pb6fmp(&mut self, val: bool) { | ||
| 6738 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | ||
| 6739 | } | ||
| 6740 | #[doc = "PB(7) Fast Mode Plus"] | ||
| 6741 | pub const fn pb7fmp(&self) -> bool { | ||
| 6742 | let val = (self.0 >> 5usize) & 0x01; | ||
| 6743 | val != 0 | ||
| 6744 | } | ||
| 6745 | #[doc = "PB(7) Fast Mode Plus"] | ||
| 6746 | pub fn set_pb7fmp(&mut self, val: bool) { | ||
| 6747 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | ||
| 6748 | } | ||
| 6749 | #[doc = "PB(8) Fast Mode Plus"] | ||
| 6750 | pub const fn pb8fmp(&self) -> bool { | ||
| 6751 | let val = (self.0 >> 6usize) & 0x01; | ||
| 6752 | val != 0 | ||
| 6753 | } | ||
| 6754 | #[doc = "PB(8) Fast Mode Plus"] | ||
| 6755 | pub fn set_pb8fmp(&mut self, val: bool) { | ||
| 6756 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | ||
| 6757 | } | ||
| 6758 | #[doc = "PB(9) Fm+"] | ||
| 6759 | pub const fn pb9fmp(&self) -> bool { | ||
| 6760 | let val = (self.0 >> 7usize) & 0x01; | ||
| 6761 | val != 0 | ||
| 6762 | } | ||
| 6763 | #[doc = "PB(9) Fm+"] | ||
| 6764 | pub fn set_pb9fmp(&mut self, val: bool) { | ||
| 6765 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 6766 | } | ||
| 6767 | #[doc = "Booster Enable"] | ||
| 6768 | pub const fn booste(&self) -> bool { | ||
| 6769 | let val = (self.0 >> 8usize) & 0x01; | 5683 | let val = (self.0 >> 8usize) & 0x01; |
| 6770 | val != 0 | 5684 | val != 0 |
| 6771 | } | 5685 | } |
| 6772 | #[doc = "Booster Enable"] | 5686 | #[doc = "Read wait start. If this bit is set, read wait operation starts."] |
| 6773 | pub fn set_booste(&mut self, val: bool) { | 5687 | pub fn set_rwstart(&mut self, val: bool) { |
| 6774 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 5688 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 6775 | } | 5689 | } |
| 6776 | #[doc = "Analog switch supply voltage selection"] | 5690 | #[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."] |
| 6777 | pub const fn boostvddsel(&self) -> bool { | 5691 | pub const fn rwstop(&self) -> bool { |
| 6778 | let val = (self.0 >> 9usize) & 0x01; | 5692 | let val = (self.0 >> 9usize) & 0x01; |
| 6779 | val != 0 | 5693 | val != 0 |
| 6780 | } | 5694 | } |
| 6781 | #[doc = "Analog switch supply voltage selection"] | 5695 | #[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."] |
| 6782 | pub fn set_boostvddsel(&mut self, val: bool) { | 5696 | pub fn set_rwstop(&mut self, val: bool) { |
| 6783 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); | 5697 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); |
| 6784 | } | 5698 | } |
| 6785 | #[doc = "Ethernet PHY Interface Selection"] | 5699 | #[doc = "Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 6786 | pub const fn epis(&self) -> u8 { | 5700 | pub const fn rwmod(&self) -> bool { |
| 6787 | let val = (self.0 >> 21usize) & 0x07; | 5701 | let val = (self.0 >> 10usize) & 0x01; |
| 6788 | val as u8 | ||
| 6789 | } | ||
| 6790 | #[doc = "Ethernet PHY Interface Selection"] | ||
| 6791 | pub fn set_epis(&mut self, val: u8) { | ||
| 6792 | self.0 = (self.0 & !(0x07 << 21usize)) | (((val as u32) & 0x07) << 21usize); | ||
| 6793 | } | ||
| 6794 | #[doc = "PA0 Switch Open"] | ||
| 6795 | pub const fn pa0so(&self) -> bool { | ||
| 6796 | let val = (self.0 >> 24usize) & 0x01; | ||
| 6797 | val != 0 | ||
| 6798 | } | ||
| 6799 | #[doc = "PA0 Switch Open"] | ||
| 6800 | pub fn set_pa0so(&mut self, val: bool) { | ||
| 6801 | self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); | ||
| 6802 | } | ||
| 6803 | #[doc = "PA1 Switch Open"] | ||
| 6804 | pub const fn pa1so(&self) -> bool { | ||
| 6805 | let val = (self.0 >> 25usize) & 0x01; | ||
| 6806 | val != 0 | ||
| 6807 | } | ||
| 6808 | #[doc = "PA1 Switch Open"] | ||
| 6809 | pub fn set_pa1so(&mut self, val: bool) { | ||
| 6810 | self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); | ||
| 6811 | } | ||
| 6812 | #[doc = "PC2 Switch Open"] | ||
| 6813 | pub const fn pc2so(&self) -> bool { | ||
| 6814 | let val = (self.0 >> 26usize) & 0x01; | ||
| 6815 | val != 0 | ||
| 6816 | } | ||
| 6817 | #[doc = "PC2 Switch Open"] | ||
| 6818 | pub fn set_pc2so(&mut self, val: bool) { | ||
| 6819 | self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); | ||
| 6820 | } | ||
| 6821 | #[doc = "PC3 Switch Open"] | ||
| 6822 | pub const fn pc3so(&self) -> bool { | ||
| 6823 | let val = (self.0 >> 27usize) & 0x01; | ||
| 6824 | val != 0 | ||
| 6825 | } | ||
| 6826 | #[doc = "PC3 Switch Open"] | ||
| 6827 | pub fn set_pc3so(&mut self, val: bool) { | ||
| 6828 | self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); | ||
| 6829 | } | ||
| 6830 | } | ||
| 6831 | impl Default for Pmcr { | ||
| 6832 | fn default() -> Pmcr { | ||
| 6833 | Pmcr(0) | ||
| 6834 | } | ||
| 6835 | } | ||
| 6836 | #[doc = "SYSCFG user register 8"] | ||
| 6837 | #[repr(transparent)] | ||
| 6838 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6839 | pub struct Ur8(pub u32); | ||
| 6840 | impl Ur8 { | ||
| 6841 | #[doc = "Mass erase protected area disabled for bank 2"] | ||
| 6842 | pub const fn mepad_2(&self) -> bool { | ||
| 6843 | let val = (self.0 >> 0usize) & 0x01; | ||
| 6844 | val != 0 | 5702 | val != 0 |
| 6845 | } | 5703 | } |
| 6846 | #[doc = "Mass erase protected area disabled for bank 2"] | 5704 | #[doc = "Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 6847 | pub fn set_mepad_2(&mut self, val: bool) { | 5705 | pub fn set_rwmod(&mut self, val: bool) { |
| 6848 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 5706 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); |
| 6849 | } | 5707 | } |
| 6850 | #[doc = "Mass erase secured area disabled for bank 2"] | 5708 | #[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."] |
| 6851 | pub const fn mesad_2(&self) -> bool { | 5709 | pub const fn sdioen(&self) -> bool { |
| 6852 | let val = (self.0 >> 16usize) & 0x01; | 5710 | let val = (self.0 >> 11usize) & 0x01; |
| 6853 | val != 0 | 5711 | val != 0 |
| 6854 | } | 5712 | } |
| 6855 | #[doc = "Mass erase secured area disabled for bank 2"] | 5713 | #[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."] |
| 6856 | pub fn set_mesad_2(&mut self, val: bool) { | 5714 | pub fn set_sdioen(&mut self, val: bool) { |
| 6857 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | 5715 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); |
| 6858 | } | ||
| 6859 | } | ||
| 6860 | impl Default for Ur8 { | ||
| 6861 | fn default() -> Ur8 { | ||
| 6862 | Ur8(0) | ||
| 6863 | } | 5716 | } |
| 6864 | } | 5717 | #[doc = "Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 6865 | #[doc = "SYSCFG user register 15"] | 5718 | pub const fn bootacken(&self) -> bool { |
| 6866 | #[repr(transparent)] | 5719 | let val = (self.0 >> 12usize) & 0x01; |
| 6867 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6868 | pub struct Ur15(pub u32); | ||
| 6869 | impl Ur15 { | ||
| 6870 | #[doc = "Freeze independent watchdog in Standby mode"] | ||
| 6871 | pub const fn fziwdgstb(&self) -> bool { | ||
| 6872 | let val = (self.0 >> 16usize) & 0x01; | ||
| 6873 | val != 0 | 5720 | val != 0 |
| 6874 | } | 5721 | } |
| 6875 | #[doc = "Freeze independent watchdog in Standby mode"] | 5722 | #[doc = "Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 6876 | pub fn set_fziwdgstb(&mut self, val: bool) { | 5723 | pub fn set_bootacken(&mut self, val: bool) { |
| 6877 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | 5724 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); |
| 6878 | } | ||
| 6879 | } | ||
| 6880 | impl Default for Ur15 { | ||
| 6881 | fn default() -> Ur15 { | ||
| 6882 | Ur15(0) | ||
| 6883 | } | 5725 | } |
| 6884 | } | 5726 | #[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."] |
| 6885 | #[doc = "SYSCFG user register 12"] | 5727 | pub const fn fiforst(&self) -> bool { |
| 6886 | #[repr(transparent)] | 5728 | let val = (self.0 >> 13usize) & 0x01; |
| 6887 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6888 | pub struct Ur12(pub u32); | ||
| 6889 | impl Ur12 { | ||
| 6890 | #[doc = "Secure mode"] | ||
| 6891 | pub const fn secure(&self) -> bool { | ||
| 6892 | let val = (self.0 >> 16usize) & 0x01; | ||
| 6893 | val != 0 | 5729 | val != 0 |
| 6894 | } | 5730 | } |
| 6895 | #[doc = "Secure mode"] | 5731 | #[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."] |
| 6896 | pub fn set_secure(&mut self, val: bool) { | 5732 | pub fn set_fiforst(&mut self, val: bool) { |
| 6897 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | 5733 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); |
| 6898 | } | ||
| 6899 | } | ||
| 6900 | impl Default for Ur12 { | ||
| 6901 | fn default() -> Ur12 { | ||
| 6902 | Ur12(0) | ||
| 6903 | } | ||
| 6904 | } | ||
| 6905 | #[doc = "SYSCFG user register 3"] | ||
| 6906 | #[repr(transparent)] | ||
| 6907 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6908 | pub struct Ur3(pub u32); | ||
| 6909 | impl Ur3 { | ||
| 6910 | #[doc = "Boot Address 1"] | ||
| 6911 | pub const fn boot_add1(&self) -> u16 { | ||
| 6912 | let val = (self.0 >> 16usize) & 0xffff; | ||
| 6913 | val as u16 | ||
| 6914 | } | ||
| 6915 | #[doc = "Boot Address 1"] | ||
| 6916 | pub fn set_boot_add1(&mut self, val: u16) { | ||
| 6917 | self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize); | ||
| 6918 | } | 5734 | } |
| 6919 | } | 5735 | } |
| 6920 | impl Default for Ur3 { | 5736 | impl Default for Dctrl { |
| 6921 | fn default() -> Ur3 { | 5737 | fn default() -> Dctrl { |
| 6922 | Ur3(0) | 5738 | Dctrl(0) |
| 6923 | } | 5739 | } |
| 6924 | } | 5740 | } |
| 6925 | #[doc = "SYSCFG user register 7"] | 5741 | #[doc = "The SDMMC_CLKCR register controls the SDMMC_CK output clock, the SDMMC_RX_CLK receive clock, and the bus width."] |
| 6926 | #[repr(transparent)] | 5742 | #[repr(transparent)] |
| 6927 | #[derive(Copy, Clone, Eq, PartialEq)] | 5743 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 6928 | pub struct Ur7(pub u32); | 5744 | pub struct Clkcr(pub u32); |
| 6929 | impl Ur7 { | 5745 | impl Clkcr { |
| 6930 | #[doc = "Secured area start address for bank 1"] | 5746 | #[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.."] |
| 6931 | pub const fn sa_beg_1(&self) -> u16 { | 5747 | pub const fn clkdiv(&self) -> u16 { |
| 6932 | let val = (self.0 >> 0usize) & 0x0fff; | 5748 | let val = (self.0 >> 0usize) & 0x03ff; |
| 6933 | val as u16 | ||
| 6934 | } | ||
| 6935 | #[doc = "Secured area start address for bank 1"] | ||
| 6936 | pub fn set_sa_beg_1(&mut self, val: u16) { | ||
| 6937 | self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); | ||
| 6938 | } | ||
| 6939 | #[doc = "Secured area end address for bank 1"] | ||
| 6940 | pub const fn sa_end_1(&self) -> u16 { | ||
| 6941 | let val = (self.0 >> 16usize) & 0x0fff; | ||
| 6942 | val as u16 | 5749 | val as u16 |
| 6943 | } | 5750 | } |
| 6944 | #[doc = "Secured area end address for bank 1"] | 5751 | #[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.."] |
| 6945 | pub fn set_sa_end_1(&mut self, val: u16) { | 5752 | pub fn set_clkdiv(&mut self, val: u16) { |
| 6946 | self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); | 5753 | self.0 = (self.0 & !(0x03ff << 0usize)) | (((val as u32) & 0x03ff) << 0usize); |
| 6947 | } | ||
| 6948 | } | ||
| 6949 | impl Default for Ur7 { | ||
| 6950 | fn default() -> Ur7 { | ||
| 6951 | Ur7(0) | ||
| 6952 | } | 5754 | } |
| 6953 | } | 5755 | #[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:"] |
| 6954 | #[doc = "SYSCFG user register 14"] | 5756 | pub const fn pwrsav(&self) -> bool { |
| 6955 | #[repr(transparent)] | 5757 | let val = (self.0 >> 12usize) & 0x01; |
| 6956 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6957 | pub struct Ur14(pub u32); | ||
| 6958 | impl Ur14 { | ||
| 6959 | #[doc = "D1 Stop Reset"] | ||
| 6960 | pub const fn d1stprst(&self) -> bool { | ||
| 6961 | let val = (self.0 >> 0usize) & 0x01; | ||
| 6962 | val != 0 | 5758 | val != 0 |
| 6963 | } | 5759 | } |
| 6964 | #[doc = "D1 Stop Reset"] | 5760 | #[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:"] |
| 6965 | pub fn set_d1stprst(&mut self, val: bool) { | 5761 | pub fn set_pwrsav(&mut self, val: bool) { |
| 6966 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 5762 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); |
| 6967 | } | ||
| 6968 | } | ||
| 6969 | impl Default for Ur14 { | ||
| 6970 | fn default() -> Ur14 { | ||
| 6971 | Ur14(0) | ||
| 6972 | } | 5763 | } |
| 6973 | } | 5764 | #[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)"] |
| 6974 | #[doc = "SYSCFG power control register"] | 5765 | pub const fn widbus(&self) -> u8 { |
| 6975 | #[repr(transparent)] | 5766 | let val = (self.0 >> 14usize) & 0x03; |
| 6976 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6977 | pub struct Pwrcr(pub u32); | ||
| 6978 | impl Pwrcr { | ||
| 6979 | #[doc = "Overdrive enable"] | ||
| 6980 | pub const fn oden(&self) -> u8 { | ||
| 6981 | let val = (self.0 >> 0usize) & 0x0f; | ||
| 6982 | val as u8 | 5767 | val as u8 |
| 6983 | } | 5768 | } |
| 6984 | #[doc = "Overdrive enable"] | 5769 | #[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)"] |
| 6985 | pub fn set_oden(&mut self, val: u8) { | 5770 | pub fn set_widbus(&mut self, val: u8) { |
| 6986 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); | 5771 | self.0 = (self.0 & !(0x03 << 14usize)) | (((val as u32) & 0x03) << 14usize); |
| 6987 | } | ||
| 6988 | } | ||
| 6989 | impl Default for Pwrcr { | ||
| 6990 | fn default() -> Pwrcr { | ||
| 6991 | Pwrcr(0) | ||
| 6992 | } | ||
| 6993 | } | ||
| 6994 | } | ||
| 6995 | } | ||
| 6996 | pub mod dma_v2 { | ||
| 6997 | use crate::generic::*; | ||
| 6998 | #[doc = "DMA controller"] | ||
| 6999 | #[derive(Copy, Clone)] | ||
| 7000 | pub struct Dma(pub *mut u8); | ||
| 7001 | unsafe impl Send for Dma {} | ||
| 7002 | unsafe impl Sync for Dma {} | ||
| 7003 | impl Dma { | ||
| 7004 | #[doc = "low interrupt status register"] | ||
| 7005 | pub fn isr(self, n: usize) -> Reg<regs::Isr, R> { | ||
| 7006 | assert!(n < 2usize); | ||
| 7007 | unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) } | ||
| 7008 | } | ||
| 7009 | #[doc = "low interrupt flag clear register"] | ||
| 7010 | pub fn ifcr(self, n: usize) -> Reg<regs::Ifcr, W> { | ||
| 7011 | assert!(n < 2usize); | ||
| 7012 | unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) } | ||
| 7013 | } | ||
| 7014 | #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"] | ||
| 7015 | pub fn st(self, n: usize) -> St { | ||
| 7016 | assert!(n < 8usize); | ||
| 7017 | unsafe { St(self.0.add(16usize + n * 24usize)) } | ||
| 7018 | } | ||
| 7019 | } | ||
| 7020 | #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"] | ||
| 7021 | #[derive(Copy, Clone)] | ||
| 7022 | pub struct St(pub *mut u8); | ||
| 7023 | unsafe impl Send for St {} | ||
| 7024 | unsafe impl Sync for St {} | ||
| 7025 | impl St { | ||
| 7026 | #[doc = "stream x configuration register"] | ||
| 7027 | pub fn cr(self) -> Reg<regs::Cr, RW> { | ||
| 7028 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 7029 | } | ||
| 7030 | #[doc = "stream x number of data register"] | ||
| 7031 | pub fn ndtr(self) -> Reg<regs::Ndtr, RW> { | ||
| 7032 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 7033 | } | ||
| 7034 | #[doc = "stream x peripheral address register"] | ||
| 7035 | pub fn par(self) -> Reg<u32, RW> { | ||
| 7036 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 7037 | } | ||
| 7038 | #[doc = "stream x memory 0 address register"] | ||
| 7039 | pub fn m0ar(self) -> Reg<u32, RW> { | ||
| 7040 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 7041 | } | ||
| 7042 | #[doc = "stream x memory 1 address register"] | ||
| 7043 | pub fn m1ar(self) -> Reg<u32, RW> { | ||
| 7044 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 7045 | } | ||
| 7046 | #[doc = "stream x FIFO control register"] | ||
| 7047 | pub fn fcr(self) -> Reg<regs::Fcr, RW> { | ||
| 7048 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | ||
| 7049 | } | ||
| 7050 | } | ||
| 7051 | pub mod vals { | ||
| 7052 | use crate::generic::*; | ||
| 7053 | #[repr(transparent)] | ||
| 7054 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7055 | pub struct Pincos(pub u8); | ||
| 7056 | impl Pincos { | ||
| 7057 | #[doc = "The offset size for the peripheral address calculation is linked to the PSIZE"] | ||
| 7058 | pub const PSIZE: Self = Self(0); | ||
| 7059 | #[doc = "The offset size for the peripheral address calculation is fixed to 4 (32-bit alignment)"] | ||
| 7060 | pub const FIXED4: Self = Self(0x01); | ||
| 7061 | } | ||
| 7062 | #[repr(transparent)] | ||
| 7063 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7064 | pub struct Ct(pub u8); | ||
| 7065 | impl Ct { | ||
| 7066 | #[doc = "The current target memory is Memory 0"] | ||
| 7067 | pub const MEMORY0: Self = Self(0); | ||
| 7068 | #[doc = "The current target memory is Memory 1"] | ||
| 7069 | pub const MEMORY1: Self = Self(0x01); | ||
| 7070 | } | ||
| 7071 | #[repr(transparent)] | ||
| 7072 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7073 | pub struct Pl(pub u8); | ||
| 7074 | impl Pl { | ||
| 7075 | #[doc = "Low"] | ||
| 7076 | pub const LOW: Self = Self(0); | ||
| 7077 | #[doc = "Medium"] | ||
| 7078 | pub const MEDIUM: Self = Self(0x01); | ||
| 7079 | #[doc = "High"] | ||
| 7080 | pub const HIGH: Self = Self(0x02); | ||
| 7081 | #[doc = "Very high"] | ||
| 7082 | pub const VERYHIGH: Self = Self(0x03); | ||
| 7083 | } | ||
| 7084 | #[repr(transparent)] | ||
| 7085 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7086 | pub struct Fth(pub u8); | ||
| 7087 | impl Fth { | ||
| 7088 | #[doc = "1/4 full FIFO"] | ||
| 7089 | pub const QUARTER: Self = Self(0); | ||
| 7090 | #[doc = "1/2 full FIFO"] | ||
| 7091 | pub const HALF: Self = Self(0x01); | ||
| 7092 | #[doc = "3/4 full FIFO"] | ||
| 7093 | pub const THREEQUARTERS: Self = Self(0x02); | ||
| 7094 | #[doc = "Full FIFO"] | ||
| 7095 | pub const FULL: Self = Self(0x03); | ||
| 7096 | } | ||
| 7097 | #[repr(transparent)] | ||
| 7098 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7099 | pub struct Circ(pub u8); | ||
| 7100 | impl Circ { | ||
| 7101 | #[doc = "Circular mode disabled"] | ||
| 7102 | pub const DISABLED: Self = Self(0); | ||
| 7103 | #[doc = "Circular mode enabled"] | ||
| 7104 | pub const ENABLED: Self = Self(0x01); | ||
| 7105 | } | ||
| 7106 | #[repr(transparent)] | ||
| 7107 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7108 | pub struct Fs(pub u8); | ||
| 7109 | impl Fs { | ||
| 7110 | #[doc = "0 < fifo_level < 1/4"] | ||
| 7111 | pub const QUARTER1: Self = Self(0); | ||
| 7112 | #[doc = "1/4 <= fifo_level < 1/2"] | ||
| 7113 | pub const QUARTER2: Self = Self(0x01); | ||
| 7114 | #[doc = "1/2 <= fifo_level < 3/4"] | ||
| 7115 | pub const QUARTER3: Self = Self(0x02); | ||
| 7116 | #[doc = "3/4 <= fifo_level < full"] | ||
| 7117 | pub const QUARTER4: Self = Self(0x03); | ||
| 7118 | #[doc = "FIFO is empty"] | ||
| 7119 | pub const EMPTY: Self = Self(0x04); | ||
| 7120 | #[doc = "FIFO is full"] | ||
| 7121 | pub const FULL: Self = Self(0x05); | ||
| 7122 | } | ||
| 7123 | #[repr(transparent)] | ||
| 7124 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7125 | pub struct Dbm(pub u8); | ||
| 7126 | impl Dbm { | ||
| 7127 | #[doc = "No buffer switching at the end of transfer"] | ||
| 7128 | pub const DISABLED: Self = Self(0); | ||
| 7129 | #[doc = "Memory target switched at the end of the DMA transfer"] | ||
| 7130 | pub const ENABLED: Self = Self(0x01); | ||
| 7131 | } | ||
| 7132 | #[repr(transparent)] | ||
| 7133 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7134 | pub struct Burst(pub u8); | ||
| 7135 | impl Burst { | ||
| 7136 | #[doc = "Single transfer"] | ||
| 7137 | pub const SINGLE: Self = Self(0); | ||
| 7138 | #[doc = "Incremental burst of 4 beats"] | ||
| 7139 | pub const INCR4: Self = Self(0x01); | ||
| 7140 | #[doc = "Incremental burst of 8 beats"] | ||
| 7141 | pub const INCR8: Self = Self(0x02); | ||
| 7142 | #[doc = "Incremental burst of 16 beats"] | ||
| 7143 | pub const INCR16: Self = Self(0x03); | ||
| 7144 | } | ||
| 7145 | #[repr(transparent)] | ||
| 7146 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7147 | pub struct Pfctrl(pub u8); | ||
| 7148 | impl Pfctrl { | ||
| 7149 | #[doc = "The DMA is the flow controller"] | ||
| 7150 | pub const DMA: Self = Self(0); | ||
| 7151 | #[doc = "The peripheral is the flow controller"] | ||
| 7152 | pub const PERIPHERAL: Self = Self(0x01); | ||
| 7153 | } | ||
| 7154 | #[repr(transparent)] | ||
| 7155 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7156 | pub struct Dir(pub u8); | ||
| 7157 | impl Dir { | ||
| 7158 | #[doc = "Peripheral-to-memory"] | ||
| 7159 | pub const PERIPHERALTOMEMORY: Self = Self(0); | ||
| 7160 | #[doc = "Memory-to-peripheral"] | ||
| 7161 | pub const MEMORYTOPERIPHERAL: Self = Self(0x01); | ||
| 7162 | #[doc = "Memory-to-memory"] | ||
| 7163 | pub const MEMORYTOMEMORY: Self = Self(0x02); | ||
| 7164 | } | ||
| 7165 | #[repr(transparent)] | ||
| 7166 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7167 | pub struct Size(pub u8); | ||
| 7168 | impl Size { | ||
| 7169 | #[doc = "Byte (8-bit)"] | ||
| 7170 | pub const BITS8: Self = Self(0); | ||
| 7171 | #[doc = "Half-word (16-bit)"] | ||
| 7172 | pub const BITS16: Self = Self(0x01); | ||
| 7173 | #[doc = "Word (32-bit)"] | ||
| 7174 | pub const BITS32: Self = Self(0x02); | ||
| 7175 | } | ||
| 7176 | #[repr(transparent)] | ||
| 7177 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7178 | pub struct Inc(pub u8); | ||
| 7179 | impl Inc { | ||
| 7180 | #[doc = "Address pointer is fixed"] | ||
| 7181 | pub const FIXED: Self = Self(0); | ||
| 7182 | #[doc = "Address pointer is incremented after each data transfer"] | ||
| 7183 | pub const INCREMENTED: Self = Self(0x01); | ||
| 7184 | } | ||
| 7185 | #[repr(transparent)] | ||
| 7186 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7187 | pub struct Dmdis(pub u8); | ||
| 7188 | impl Dmdis { | ||
| 7189 | #[doc = "Direct mode is enabled"] | ||
| 7190 | pub const ENABLED: Self = Self(0); | ||
| 7191 | #[doc = "Direct mode is disabled"] | ||
| 7192 | pub const DISABLED: Self = Self(0x01); | ||
| 7193 | } | ||
| 7194 | } | ||
| 7195 | pub mod regs { | ||
| 7196 | use crate::generic::*; | ||
| 7197 | #[doc = "low interrupt status register"] | ||
| 7198 | #[repr(transparent)] | ||
| 7199 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7200 | pub struct Isr(pub u32); | ||
| 7201 | impl Isr { | ||
| 7202 | #[doc = "Stream x FIFO error interrupt flag (x=3..0)"] | ||
| 7203 | pub fn feif(&self, n: usize) -> bool { | ||
| 7204 | assert!(n < 4usize); | ||
| 7205 | let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 7206 | let val = (self.0 >> offs) & 0x01; | ||
| 7207 | val != 0 | ||
| 7208 | } | ||
| 7209 | #[doc = "Stream x FIFO error interrupt flag (x=3..0)"] | ||
| 7210 | pub fn set_feif(&mut self, n: usize, val: bool) { | ||
| 7211 | assert!(n < 4usize); | ||
| 7212 | let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 7213 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7214 | } | ||
| 7215 | #[doc = "Stream x direct mode error interrupt flag (x=3..0)"] | ||
| 7216 | pub fn dmeif(&self, n: usize) -> bool { | ||
| 7217 | assert!(n < 4usize); | ||
| 7218 | let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 7219 | let val = (self.0 >> offs) & 0x01; | ||
| 7220 | val != 0 | ||
| 7221 | } | ||
| 7222 | #[doc = "Stream x direct mode error interrupt flag (x=3..0)"] | ||
| 7223 | pub fn set_dmeif(&mut self, n: usize, val: bool) { | ||
| 7224 | assert!(n < 4usize); | ||
| 7225 | let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 7226 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7227 | } | ||
| 7228 | #[doc = "Stream x transfer error interrupt flag (x=3..0)"] | ||
| 7229 | pub fn teif(&self, n: usize) -> bool { | ||
| 7230 | assert!(n < 4usize); | ||
| 7231 | let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 7232 | let val = (self.0 >> offs) & 0x01; | ||
| 7233 | val != 0 | ||
| 7234 | } | ||
| 7235 | #[doc = "Stream x transfer error interrupt flag (x=3..0)"] | ||
| 7236 | pub fn set_teif(&mut self, n: usize, val: bool) { | ||
| 7237 | assert!(n < 4usize); | ||
| 7238 | let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 7239 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7240 | } | ||
| 7241 | #[doc = "Stream x half transfer interrupt flag (x=3..0)"] | ||
| 7242 | pub fn htif(&self, n: usize) -> bool { | ||
| 7243 | assert!(n < 4usize); | ||
| 7244 | let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 7245 | let val = (self.0 >> offs) & 0x01; | ||
| 7246 | val != 0 | ||
| 7247 | } | ||
| 7248 | #[doc = "Stream x half transfer interrupt flag (x=3..0)"] | ||
| 7249 | pub fn set_htif(&mut self, n: usize, val: bool) { | ||
| 7250 | assert!(n < 4usize); | ||
| 7251 | let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 7252 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7253 | } | ||
| 7254 | #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"] | ||
| 7255 | pub fn tcif(&self, n: usize) -> bool { | ||
| 7256 | assert!(n < 4usize); | ||
| 7257 | let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 7258 | let val = (self.0 >> offs) & 0x01; | ||
| 7259 | val != 0 | ||
| 7260 | } | ||
| 7261 | #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"] | ||
| 7262 | pub fn set_tcif(&mut self, n: usize, val: bool) { | ||
| 7263 | assert!(n < 4usize); | ||
| 7264 | let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 7265 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7266 | } | ||
| 7267 | } | ||
| 7268 | impl Default for Isr { | ||
| 7269 | fn default() -> Isr { | ||
| 7270 | Isr(0) | ||
| 7271 | } | ||
| 7272 | } | ||
| 7273 | #[doc = "stream x number of data register"] | ||
| 7274 | #[repr(transparent)] | ||
| 7275 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7276 | pub struct Ndtr(pub u32); | ||
| 7277 | impl Ndtr { | ||
| 7278 | #[doc = "Number of data items to transfer"] | ||
| 7279 | pub const fn ndt(&self) -> u16 { | ||
| 7280 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 7281 | val as u16 | ||
| 7282 | } | ||
| 7283 | #[doc = "Number of data items to transfer"] | ||
| 7284 | pub fn set_ndt(&mut self, val: u16) { | ||
| 7285 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 7286 | } | ||
| 7287 | } | ||
| 7288 | impl Default for Ndtr { | ||
| 7289 | fn default() -> Ndtr { | ||
| 7290 | Ndtr(0) | ||
| 7291 | } | ||
| 7292 | } | ||
| 7293 | #[doc = "stream x configuration register"] | ||
| 7294 | #[repr(transparent)] | ||
| 7295 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7296 | pub struct Cr(pub u32); | ||
| 7297 | impl Cr { | ||
| 7298 | #[doc = "Stream enable / flag stream ready when read low"] | ||
| 7299 | pub const fn en(&self) -> bool { | ||
| 7300 | let val = (self.0 >> 0usize) & 0x01; | ||
| 7301 | val != 0 | ||
| 7302 | } | ||
| 7303 | #[doc = "Stream enable / flag stream ready when read low"] | ||
| 7304 | pub fn set_en(&mut self, val: bool) { | ||
| 7305 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 7306 | } | ||
| 7307 | #[doc = "Direct mode error interrupt enable"] | ||
| 7308 | pub const fn dmeie(&self) -> bool { | ||
| 7309 | let val = (self.0 >> 1usize) & 0x01; | ||
| 7310 | val != 0 | ||
| 7311 | } | ||
| 7312 | #[doc = "Direct mode error interrupt enable"] | ||
| 7313 | pub fn set_dmeie(&mut self, val: bool) { | ||
| 7314 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 7315 | } | ||
| 7316 | #[doc = "Transfer error interrupt enable"] | ||
| 7317 | pub const fn teie(&self) -> bool { | ||
| 7318 | let val = (self.0 >> 2usize) & 0x01; | ||
| 7319 | val != 0 | ||
| 7320 | } | ||
| 7321 | #[doc = "Transfer error interrupt enable"] | ||
| 7322 | pub fn set_teie(&mut self, val: bool) { | ||
| 7323 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | ||
| 7324 | } | 5772 | } |
| 7325 | #[doc = "Half transfer interrupt enable"] | 5773 | #[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."] |
| 7326 | pub const fn htie(&self) -> bool { | 5774 | pub const fn negedge(&self) -> bool { |
| 7327 | let val = (self.0 >> 3usize) & 0x01; | 5775 | let val = (self.0 >> 16usize) & 0x01; |
| 7328 | val != 0 | 5776 | val != 0 |
| 7329 | } | 5777 | } |
| 7330 | #[doc = "Half transfer interrupt enable"] | 5778 | #[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."] |
| 7331 | pub fn set_htie(&mut self, val: bool) { | 5779 | pub fn set_negedge(&mut self, val: bool) { |
| 7332 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | 5780 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); |
| 7333 | } | 5781 | } |
| 7334 | #[doc = "Transfer complete interrupt enable"] | 5782 | #[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."] |
| 7335 | pub const fn tcie(&self) -> bool { | 5783 | pub const fn hwfc_en(&self) -> bool { |
| 7336 | let val = (self.0 >> 4usize) & 0x01; | 5784 | let val = (self.0 >> 17usize) & 0x01; |
| 7337 | val != 0 | 5785 | val != 0 |
| 7338 | } | 5786 | } |
| 7339 | #[doc = "Transfer complete interrupt enable"] | 5787 | #[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."] |
| 7340 | pub fn set_tcie(&mut self, val: bool) { | 5788 | pub fn set_hwfc_en(&mut self, val: bool) { |
| 7341 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | 5789 | self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); |
| 7342 | } | ||
| 7343 | #[doc = "Peripheral flow controller"] | ||
| 7344 | pub const fn pfctrl(&self) -> super::vals::Pfctrl { | ||
| 7345 | let val = (self.0 >> 5usize) & 0x01; | ||
| 7346 | super::vals::Pfctrl(val as u8) | ||
| 7347 | } | ||
| 7348 | #[doc = "Peripheral flow controller"] | ||
| 7349 | pub fn set_pfctrl(&mut self, val: super::vals::Pfctrl) { | ||
| 7350 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize); | ||
| 7351 | } | ||
| 7352 | #[doc = "Data transfer direction"] | ||
| 7353 | pub const fn dir(&self) -> super::vals::Dir { | ||
| 7354 | let val = (self.0 >> 6usize) & 0x03; | ||
| 7355 | super::vals::Dir(val as u8) | ||
| 7356 | } | ||
| 7357 | #[doc = "Data transfer direction"] | ||
| 7358 | pub fn set_dir(&mut self, val: super::vals::Dir) { | ||
| 7359 | self.0 = (self.0 & !(0x03 << 6usize)) | (((val.0 as u32) & 0x03) << 6usize); | ||
| 7360 | } | ||
| 7361 | #[doc = "Circular mode"] | ||
| 7362 | pub const fn circ(&self) -> super::vals::Circ { | ||
| 7363 | let val = (self.0 >> 8usize) & 0x01; | ||
| 7364 | super::vals::Circ(val as u8) | ||
| 7365 | } | ||
| 7366 | #[doc = "Circular mode"] | ||
| 7367 | pub fn set_circ(&mut self, val: super::vals::Circ) { | ||
| 7368 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val.0 as u32) & 0x01) << 8usize); | ||
| 7369 | } | ||
| 7370 | #[doc = "Peripheral increment mode"] | ||
| 7371 | pub const fn pinc(&self) -> super::vals::Inc { | ||
| 7372 | let val = (self.0 >> 9usize) & 0x01; | ||
| 7373 | super::vals::Inc(val as u8) | ||
| 7374 | } | ||
| 7375 | #[doc = "Peripheral increment mode"] | ||
| 7376 | pub fn set_pinc(&mut self, val: super::vals::Inc) { | ||
| 7377 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize); | ||
| 7378 | } | ||
| 7379 | #[doc = "Memory increment mode"] | ||
| 7380 | pub const fn minc(&self) -> super::vals::Inc { | ||
| 7381 | let val = (self.0 >> 10usize) & 0x01; | ||
| 7382 | super::vals::Inc(val as u8) | ||
| 7383 | } | ||
| 7384 | #[doc = "Memory increment mode"] | ||
| 7385 | pub fn set_minc(&mut self, val: super::vals::Inc) { | ||
| 7386 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); | ||
| 7387 | } | ||
| 7388 | #[doc = "Peripheral data size"] | ||
| 7389 | pub const fn psize(&self) -> super::vals::Size { | ||
| 7390 | let val = (self.0 >> 11usize) & 0x03; | ||
| 7391 | super::vals::Size(val as u8) | ||
| 7392 | } | ||
| 7393 | #[doc = "Peripheral data size"] | ||
| 7394 | pub fn set_psize(&mut self, val: super::vals::Size) { | ||
| 7395 | self.0 = (self.0 & !(0x03 << 11usize)) | (((val.0 as u32) & 0x03) << 11usize); | ||
| 7396 | } | ||
| 7397 | #[doc = "Memory data size"] | ||
| 7398 | pub const fn msize(&self) -> super::vals::Size { | ||
| 7399 | let val = (self.0 >> 13usize) & 0x03; | ||
| 7400 | super::vals::Size(val as u8) | ||
| 7401 | } | ||
| 7402 | #[doc = "Memory data size"] | ||
| 7403 | pub fn set_msize(&mut self, val: super::vals::Size) { | ||
| 7404 | self.0 = (self.0 & !(0x03 << 13usize)) | (((val.0 as u32) & 0x03) << 13usize); | ||
| 7405 | } | ||
| 7406 | #[doc = "Peripheral increment offset size"] | ||
| 7407 | pub const fn pincos(&self) -> super::vals::Pincos { | ||
| 7408 | let val = (self.0 >> 15usize) & 0x01; | ||
| 7409 | super::vals::Pincos(val as u8) | ||
| 7410 | } | ||
| 7411 | #[doc = "Peripheral increment offset size"] | ||
| 7412 | pub fn set_pincos(&mut self, val: super::vals::Pincos) { | ||
| 7413 | self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize); | ||
| 7414 | } | ||
| 7415 | #[doc = "Priority level"] | ||
| 7416 | pub const fn pl(&self) -> super::vals::Pl { | ||
| 7417 | let val = (self.0 >> 16usize) & 0x03; | ||
| 7418 | super::vals::Pl(val as u8) | ||
| 7419 | } | ||
| 7420 | #[doc = "Priority level"] | ||
| 7421 | pub fn set_pl(&mut self, val: super::vals::Pl) { | ||
| 7422 | self.0 = (self.0 & !(0x03 << 16usize)) | (((val.0 as u32) & 0x03) << 16usize); | ||
| 7423 | } | 5790 | } |
| 7424 | #[doc = "Double buffer mode"] | 5791 | #[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)"] |
| 7425 | pub const fn dbm(&self) -> super::vals::Dbm { | 5792 | pub const fn ddr(&self) -> bool { |
| 7426 | let val = (self.0 >> 18usize) & 0x01; | 5793 | let val = (self.0 >> 18usize) & 0x01; |
| 7427 | super::vals::Dbm(val as u8) | 5794 | val != 0 |
| 7428 | } | 5795 | } |
| 7429 | #[doc = "Double buffer mode"] | 5796 | #[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)"] |
| 7430 | pub fn set_dbm(&mut self, val: super::vals::Dbm) { | 5797 | pub fn set_ddr(&mut self, val: bool) { |
| 7431 | self.0 = (self.0 & !(0x01 << 18usize)) | (((val.0 as u32) & 0x01) << 18usize); | 5798 | self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); |
| 7432 | } | 5799 | } |
| 7433 | #[doc = "Current target (only in double buffer mode)"] | 5800 | #[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)"] |
| 7434 | pub const fn ct(&self) -> super::vals::Ct { | 5801 | pub const fn busspeed(&self) -> bool { |
| 7435 | let val = (self.0 >> 19usize) & 0x01; | 5802 | let val = (self.0 >> 19usize) & 0x01; |
| 7436 | super::vals::Ct(val as u8) | 5803 | val != 0 |
| 7437 | } | ||
| 7438 | #[doc = "Current target (only in double buffer mode)"] | ||
| 7439 | pub fn set_ct(&mut self, val: super::vals::Ct) { | ||
| 7440 | self.0 = (self.0 & !(0x01 << 19usize)) | (((val.0 as u32) & 0x01) << 19usize); | ||
| 7441 | } | ||
| 7442 | #[doc = "Peripheral burst transfer configuration"] | ||
| 7443 | pub const fn pburst(&self) -> super::vals::Burst { | ||
| 7444 | let val = (self.0 >> 21usize) & 0x03; | ||
| 7445 | super::vals::Burst(val as u8) | ||
| 7446 | } | ||
| 7447 | #[doc = "Peripheral burst transfer configuration"] | ||
| 7448 | pub fn set_pburst(&mut self, val: super::vals::Burst) { | ||
| 7449 | self.0 = (self.0 & !(0x03 << 21usize)) | (((val.0 as u32) & 0x03) << 21usize); | ||
| 7450 | } | ||
| 7451 | #[doc = "Memory burst transfer configuration"] | ||
| 7452 | pub const fn mburst(&self) -> super::vals::Burst { | ||
| 7453 | let val = (self.0 >> 23usize) & 0x03; | ||
| 7454 | super::vals::Burst(val as u8) | ||
| 7455 | } | 5804 | } |
| 7456 | #[doc = "Memory burst transfer configuration"] | 5805 | #[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)"] |
| 7457 | pub fn set_mburst(&mut self, val: super::vals::Burst) { | 5806 | pub fn set_busspeed(&mut self, val: bool) { |
| 7458 | self.0 = (self.0 & !(0x03 << 23usize)) | (((val.0 as u32) & 0x03) << 23usize); | 5807 | self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); |
| 7459 | } | 5808 | } |
| 7460 | #[doc = "Channel selection"] | 5809 | #[doc = "Receive clock selection. These bits can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"] |
| 7461 | pub const fn chsel(&self) -> u8 { | 5810 | pub const fn selclkrx(&self) -> u8 { |
| 7462 | let val = (self.0 >> 25usize) & 0x0f; | 5811 | let val = (self.0 >> 20usize) & 0x03; |
| 7463 | val as u8 | 5812 | val as u8 |
| 7464 | } | 5813 | } |
| 7465 | #[doc = "Channel selection"] | 5814 | #[doc = "Receive clock selection. These bits can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"] |
| 7466 | pub fn set_chsel(&mut self, val: u8) { | 5815 | pub fn set_selclkrx(&mut self, val: u8) { |
| 7467 | self.0 = (self.0 & !(0x0f << 25usize)) | (((val as u32) & 0x0f) << 25usize); | 5816 | self.0 = (self.0 & !(0x03 << 20usize)) | (((val as u32) & 0x03) << 20usize); |
| 7468 | } | 5817 | } |
| 7469 | } | 5818 | } |
| 7470 | impl Default for Cr { | 5819 | impl Default for Clkcr { |
| 7471 | fn default() -> Cr { | 5820 | fn default() -> Clkcr { |
| 7472 | Cr(0) | 5821 | Clkcr(0) |
| 7473 | } | 5822 | } |
| 7474 | } | 5823 | } |
| 7475 | #[doc = "low interrupt flag clear register"] | 5824 | #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] |
| 7476 | #[repr(transparent)] | 5825 | #[repr(transparent)] |
| 7477 | #[derive(Copy, Clone, Eq, PartialEq)] | 5826 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 7478 | pub struct Ifcr(pub u32); | 5827 | pub struct Resp4r(pub u32); |
| 7479 | impl Ifcr { | 5828 | impl Resp4r { |
| 7480 | #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"] | 5829 | #[doc = "see Table404."] |
| 7481 | pub fn cfeif(&self, n: usize) -> bool { | 5830 | pub const fn cardstatus4(&self) -> u32 { |
| 7482 | assert!(n < 4usize); | 5831 | let val = (self.0 >> 0usize) & 0xffff_ffff; |
| 7483 | let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | 5832 | val as u32 |
| 7484 | let val = (self.0 >> offs) & 0x01; | ||
| 7485 | val != 0 | ||
| 7486 | } | ||
| 7487 | #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"] | ||
| 7488 | pub fn set_cfeif(&mut self, n: usize, val: bool) { | ||
| 7489 | assert!(n < 4usize); | ||
| 7490 | let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 7491 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7492 | } | ||
| 7493 | #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"] | ||
| 7494 | pub fn cdmeif(&self, n: usize) -> bool { | ||
| 7495 | assert!(n < 4usize); | ||
| 7496 | let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 7497 | let val = (self.0 >> offs) & 0x01; | ||
| 7498 | val != 0 | ||
| 7499 | } | ||
| 7500 | #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"] | ||
| 7501 | pub fn set_cdmeif(&mut self, n: usize, val: bool) { | ||
| 7502 | assert!(n < 4usize); | ||
| 7503 | let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 7504 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7505 | } | ||
| 7506 | #[doc = "Stream x clear transfer error interrupt flag (x = 3..0)"] | ||
| 7507 | pub fn cteif(&self, n: usize) -> bool { | ||
| 7508 | assert!(n < 4usize); | ||
| 7509 | let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 7510 | let val = (self.0 >> offs) & 0x01; | ||
| 7511 | val != 0 | ||
| 7512 | } | ||
| 7513 | #[doc = "Stream x clear transfer error interrupt flag (x = 3..0)"] | ||
| 7514 | pub fn set_cteif(&mut self, n: usize, val: bool) { | ||
| 7515 | assert!(n < 4usize); | ||
| 7516 | let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 7517 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7518 | } | ||
| 7519 | #[doc = "Stream x clear half transfer interrupt flag (x = 3..0)"] | ||
| 7520 | pub fn chtif(&self, n: usize) -> bool { | ||
| 7521 | assert!(n < 4usize); | ||
| 7522 | let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 7523 | let val = (self.0 >> offs) & 0x01; | ||
| 7524 | val != 0 | ||
| 7525 | } | ||
| 7526 | #[doc = "Stream x clear half transfer interrupt flag (x = 3..0)"] | ||
| 7527 | pub fn set_chtif(&mut self, n: usize, val: bool) { | ||
| 7528 | assert!(n < 4usize); | ||
| 7529 | let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 7530 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7531 | } | ||
| 7532 | #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"] | ||
| 7533 | pub fn ctcif(&self, n: usize) -> bool { | ||
| 7534 | assert!(n < 4usize); | ||
| 7535 | let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 7536 | let val = (self.0 >> offs) & 0x01; | ||
| 7537 | val != 0 | ||
| 7538 | } | 5833 | } |
| 7539 | #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"] | 5834 | #[doc = "see Table404."] |
| 7540 | pub fn set_ctcif(&mut self, n: usize, val: bool) { | 5835 | pub fn set_cardstatus4(&mut self, val: u32) { |
| 7541 | assert!(n < 4usize); | 5836 | self.0 = |
| 7542 | let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | 5837 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); |
| 7543 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7544 | } | 5838 | } |
| 7545 | } | 5839 | } |
| 7546 | impl Default for Ifcr { | 5840 | impl Default for Resp4r { |
| 7547 | fn default() -> Ifcr { | 5841 | fn default() -> Resp4r { |
| 7548 | Ifcr(0) | 5842 | Resp4r(0) |
| 7549 | } | 5843 | } |
| 7550 | } | 5844 | } |
| 7551 | #[doc = "stream x FIFO control register"] | 5845 | #[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."] |
| 7552 | #[repr(transparent)] | 5846 | #[repr(transparent)] |
| 7553 | #[derive(Copy, Clone, Eq, PartialEq)] | 5847 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 7554 | pub struct Fcr(pub u32); | 5848 | pub struct Dlenr(pub u32); |
| 7555 | impl Fcr { | 5849 | impl Dlenr { |
| 7556 | #[doc = "FIFO threshold selection"] | 5850 | #[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."] |
| 7557 | pub const fn fth(&self) -> super::vals::Fth { | 5851 | pub const fn datalength(&self) -> u32 { |
| 7558 | let val = (self.0 >> 0usize) & 0x03; | 5852 | let val = (self.0 >> 0usize) & 0x01ff_ffff; |
| 7559 | super::vals::Fth(val as u8) | 5853 | val as u32 |
| 7560 | } | ||
| 7561 | #[doc = "FIFO threshold selection"] | ||
| 7562 | pub fn set_fth(&mut self, val: super::vals::Fth) { | ||
| 7563 | self.0 = (self.0 & !(0x03 << 0usize)) | (((val.0 as u32) & 0x03) << 0usize); | ||
| 7564 | } | ||
| 7565 | #[doc = "Direct mode disable"] | ||
| 7566 | pub const fn dmdis(&self) -> super::vals::Dmdis { | ||
| 7567 | let val = (self.0 >> 2usize) & 0x01; | ||
| 7568 | super::vals::Dmdis(val as u8) | ||
| 7569 | } | ||
| 7570 | #[doc = "Direct mode disable"] | ||
| 7571 | pub fn set_dmdis(&mut self, val: super::vals::Dmdis) { | ||
| 7572 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); | ||
| 7573 | } | ||
| 7574 | #[doc = "FIFO status"] | ||
| 7575 | pub const fn fs(&self) -> super::vals::Fs { | ||
| 7576 | let val = (self.0 >> 3usize) & 0x07; | ||
| 7577 | super::vals::Fs(val as u8) | ||
| 7578 | } | ||
| 7579 | #[doc = "FIFO status"] | ||
| 7580 | pub fn set_fs(&mut self, val: super::vals::Fs) { | ||
| 7581 | self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize); | ||
| 7582 | } | ||
| 7583 | #[doc = "FIFO error interrupt enable"] | ||
| 7584 | pub const fn feie(&self) -> bool { | ||
| 7585 | let val = (self.0 >> 7usize) & 0x01; | ||
| 7586 | val != 0 | ||
| 7587 | } | 5854 | } |
| 7588 | #[doc = "FIFO error interrupt enable"] | 5855 | #[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."] |
| 7589 | pub fn set_feie(&mut self, val: bool) { | 5856 | pub fn set_datalength(&mut self, val: u32) { |
| 7590 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | 5857 | self.0 = |
| 5858 | (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize); | ||
| 7591 | } | 5859 | } |
| 7592 | } | 5860 | } |
| 7593 | impl Default for Fcr { | 5861 | impl Default for Dlenr { |
| 7594 | fn default() -> Fcr { | 5862 | fn default() -> Dlenr { |
| 7595 | Fcr(0) | 5863 | Dlenr(0) |
| 7596 | } | 5864 | } |
| 7597 | } | 5865 | } |
| 7598 | } | ||
| 7599 | } | ||
| 7600 | pub mod sdmmc_v2 { | ||
| 7601 | use crate::generic::*; | ||
| 7602 | #[doc = "SDMMC"] | ||
| 7603 | #[derive(Copy, Clone)] | ||
| 7604 | pub struct Sdmmc(pub *mut u8); | ||
| 7605 | unsafe impl Send for Sdmmc {} | ||
| 7606 | unsafe impl Sync for Sdmmc {} | ||
| 7607 | impl Sdmmc { | ||
| 7608 | #[doc = "SDMMC power control register"] | ||
| 7609 | pub fn power(self) -> Reg<regs::Power, RW> { | ||
| 7610 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 7611 | } | ||
| 7612 | #[doc = "The SDMMC_CLKCR register controls the SDMMC_CK output clock, the SDMMC_RX_CLK receive clock, and the bus width."] | ||
| 7613 | pub fn clkcr(self) -> Reg<regs::Clkcr, RW> { | ||
| 7614 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 7615 | } | ||
| 7616 | #[doc = "The SDMMC_ARGR register contains a 32-bit command argument, which is sent to a card as part of a command message."] | ||
| 7617 | pub fn argr(self) -> Reg<regs::Argr, RW> { | ||
| 7618 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 7619 | } | ||
| 7620 | #[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)."] | ||
| 7621 | pub fn cmdr(self) -> Reg<regs::Cmdr, RW> { | ||
| 7622 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 7623 | } | ||
| 7624 | #[doc = "SDMMC command response register"] | ||
| 7625 | pub fn respcmdr(self) -> Reg<regs::Respcmdr, R> { | ||
| 7626 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 7627 | } | ||
| 7628 | #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] | ||
| 7629 | pub fn respr(self, n: usize) -> Reg<regs::Resp1r, R> { | ||
| 7630 | assert!(n < 4usize); | ||
| 7631 | unsafe { Reg::from_ptr(self.0.add(20usize + n * 4usize)) } | ||
| 7632 | } | ||
| 7633 | #[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."] | ||
| 7634 | pub fn dtimer(self) -> Reg<regs::Dtimer, RW> { | ||
| 7635 | unsafe { Reg::from_ptr(self.0.add(36usize)) } | ||
| 7636 | } | ||
| 7637 | #[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."] | ||
| 7638 | pub fn dlenr(self) -> Reg<regs::Dlenr, RW> { | ||
| 7639 | unsafe { Reg::from_ptr(self.0.add(40usize)) } | ||
| 7640 | } | ||
| 7641 | #[doc = "The SDMMC_DCTRL register control the data path state machine (DPSM)."] | ||
| 7642 | pub fn dctrl(self) -> Reg<regs::Dctrl, RW> { | ||
| 7643 | unsafe { Reg::from_ptr(self.0.add(44usize)) } | ||
| 7644 | } | ||
| 7645 | #[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."] | ||
| 7646 | pub fn dcntr(self) -> Reg<regs::Dcntr, R> { | ||
| 7647 | unsafe { Reg::from_ptr(self.0.add(48usize)) } | ||
| 7648 | } | ||
| 7649 | #[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)"] | ||
| 7650 | pub fn star(self) -> Reg<regs::Star, R> { | ||
| 7651 | unsafe { Reg::from_ptr(self.0.add(52usize)) } | ||
| 7652 | } | ||
| 7653 | #[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."] | ||
| 7654 | pub fn icr(self) -> Reg<regs::Icr, RW> { | ||
| 7655 | unsafe { Reg::from_ptr(self.0.add(56usize)) } | ||
| 7656 | } | ||
| 7657 | #[doc = "The interrupt mask register determines which status flags generate an interrupt request by setting the corresponding bit to 1."] | ||
| 7658 | pub fn maskr(self) -> Reg<regs::Maskr, RW> { | ||
| 7659 | unsafe { Reg::from_ptr(self.0.add(60usize)) } | ||
| 7660 | } | ||
| 7661 | #[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."] | ||
| 7662 | pub fn acktimer(self) -> Reg<regs::Acktimer, RW> { | ||
| 7663 | unsafe { Reg::from_ptr(self.0.add(64usize)) } | ||
| 7664 | } | ||
| 7665 | #[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."] | ||
| 7666 | pub fn idmactrlr(self) -> Reg<regs::Idmactrlr, RW> { | ||
| 7667 | unsafe { Reg::from_ptr(self.0.add(80usize)) } | ||
| 7668 | } | ||
| 7669 | #[doc = "The SDMMC_IDMABSIZER register contains the buffers size when in double buffer configuration."] | ||
| 7670 | pub fn idmabsizer(self) -> Reg<regs::Idmabsizer, RW> { | ||
| 7671 | unsafe { Reg::from_ptr(self.0.add(84usize)) } | ||
| 7672 | } | ||
| 7673 | #[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."] | ||
| 7674 | pub fn idmabase0r(self) -> Reg<regs::Idmabase0r, RW> { | ||
| 7675 | unsafe { Reg::from_ptr(self.0.add(88usize)) } | ||
| 7676 | } | ||
| 7677 | #[doc = "The SDMMC_IDMABASE1R register contains the double buffer configuration second buffer memory base address."] | ||
| 7678 | pub fn idmabase1r(self) -> Reg<regs::Idmabase1r, RW> { | ||
| 7679 | unsafe { Reg::from_ptr(self.0.add(92usize)) } | ||
| 7680 | } | ||
| 7681 | #[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."] | ||
| 7682 | pub fn fifor(self) -> Reg<regs::Fifor, RW> { | ||
| 7683 | unsafe { Reg::from_ptr(self.0.add(128usize)) } | ||
| 7684 | } | ||
| 7685 | #[doc = "SDMMC IP version register"] | ||
| 7686 | pub fn ver(self) -> Reg<regs::Ver, R> { | ||
| 7687 | unsafe { Reg::from_ptr(self.0.add(1012usize)) } | ||
| 7688 | } | ||
| 7689 | #[doc = "SDMMC IP identification register"] | ||
| 7690 | pub fn id(self) -> Reg<regs::Id, R> { | ||
| 7691 | unsafe { Reg::from_ptr(self.0.add(1016usize)) } | ||
| 7692 | } | ||
| 7693 | } | ||
| 7694 | pub mod regs { | ||
| 7695 | use crate::generic::*; | ||
| 7696 | #[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)"] | 5866 | #[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)"] |
| 7697 | #[repr(transparent)] | 5867 | #[repr(transparent)] |
| 7698 | #[derive(Copy, Clone, Eq, PartialEq)] | 5868 | #[derive(Copy, Clone, Eq, PartialEq)] |
| @@ -7965,108 +6135,27 @@ pub mod sdmmc_v2 { | |||
| 7965 | Star(0) | 6135 | Star(0) |
| 7966 | } | 6136 | } |
| 7967 | } | 6137 | } |
| 7968 | #[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."] | 6138 | #[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."] |
| 7969 | #[repr(transparent)] | 6139 | #[repr(transparent)] |
| 7970 | #[derive(Copy, Clone, Eq, PartialEq)] | 6140 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 7971 | pub struct Fifor(pub u32); | 6141 | pub struct Idmabase0r(pub u32); |
| 7972 | impl Fifor { | 6142 | impl Idmabase0r { |
| 7973 | #[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."] | 6143 | #[doc = "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0] |
| 7974 | pub const fn fifodata(&self) -> u32 { | 6144 | 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)."] |
| 6145 | pub const fn idmabase0(&self) -> u32 { | ||
| 7975 | let val = (self.0 >> 0usize) & 0xffff_ffff; | 6146 | let val = (self.0 >> 0usize) & 0xffff_ffff; |
| 7976 | val as u32 | 6147 | val as u32 |
| 7977 | } | 6148 | } |
| 7978 | #[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."] | 6149 | #[doc = "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0] |
| 7979 | pub fn set_fifodata(&mut self, val: u32) { | 6150 | 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)."] |
| 6151 | pub fn set_idmabase0(&mut self, val: u32) { | ||
| 7980 | self.0 = | 6152 | self.0 = |
| 7981 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | 6153 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); |
| 7982 | } | 6154 | } |
| 7983 | } | 6155 | } |
| 7984 | impl Default for Fifor { | 6156 | impl Default for Idmabase0r { |
| 7985 | fn default() -> Fifor { | 6157 | fn default() -> Idmabase0r { |
| 7986 | Fifor(0) | 6158 | Idmabase0r(0) |
| 7987 | } | ||
| 7988 | } | ||
| 7989 | #[doc = "The SDMMC_CLKCR register controls the SDMMC_CK output clock, the SDMMC_RX_CLK receive clock, and the bus width."] | ||
| 7990 | #[repr(transparent)] | ||
| 7991 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7992 | pub struct Clkcr(pub u32); | ||
| 7993 | impl Clkcr { | ||
| 7994 | #[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.."] | ||
| 7995 | pub const fn clkdiv(&self) -> u16 { | ||
| 7996 | let val = (self.0 >> 0usize) & 0x03ff; | ||
| 7997 | val as u16 | ||
| 7998 | } | ||
| 7999 | #[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.."] | ||
| 8000 | pub fn set_clkdiv(&mut self, val: u16) { | ||
| 8001 | self.0 = (self.0 & !(0x03ff << 0usize)) | (((val as u32) & 0x03ff) << 0usize); | ||
| 8002 | } | ||
| 8003 | #[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:"] | ||
| 8004 | pub const fn pwrsav(&self) -> bool { | ||
| 8005 | let val = (self.0 >> 12usize) & 0x01; | ||
| 8006 | val != 0 | ||
| 8007 | } | ||
| 8008 | #[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:"] | ||
| 8009 | pub fn set_pwrsav(&mut self, val: bool) { | ||
| 8010 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); | ||
| 8011 | } | ||
| 8012 | #[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)"] | ||
| 8013 | pub const fn widbus(&self) -> u8 { | ||
| 8014 | let val = (self.0 >> 14usize) & 0x03; | ||
| 8015 | val as u8 | ||
| 8016 | } | ||
| 8017 | #[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)"] | ||
| 8018 | pub fn set_widbus(&mut self, val: u8) { | ||
| 8019 | self.0 = (self.0 & !(0x03 << 14usize)) | (((val as u32) & 0x03) << 14usize); | ||
| 8020 | } | ||
| 8021 | #[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."] | ||
| 8022 | pub const fn negedge(&self) -> bool { | ||
| 8023 | let val = (self.0 >> 16usize) & 0x01; | ||
| 8024 | val != 0 | ||
| 8025 | } | ||
| 8026 | #[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."] | ||
| 8027 | pub fn set_negedge(&mut self, val: bool) { | ||
| 8028 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | ||
| 8029 | } | ||
| 8030 | #[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."] | ||
| 8031 | pub const fn hwfc_en(&self) -> bool { | ||
| 8032 | let val = (self.0 >> 17usize) & 0x01; | ||
| 8033 | val != 0 | ||
| 8034 | } | ||
| 8035 | #[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."] | ||
| 8036 | pub fn set_hwfc_en(&mut self, val: bool) { | ||
| 8037 | self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); | ||
| 8038 | } | ||
| 8039 | #[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)"] | ||
| 8040 | pub const fn ddr(&self) -> bool { | ||
| 8041 | let val = (self.0 >> 18usize) & 0x01; | ||
| 8042 | val != 0 | ||
| 8043 | } | ||
| 8044 | #[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)"] | ||
| 8045 | pub fn set_ddr(&mut self, val: bool) { | ||
| 8046 | self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); | ||
| 8047 | } | ||
| 8048 | #[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)"] | ||
| 8049 | pub const fn busspeed(&self) -> bool { | ||
| 8050 | let val = (self.0 >> 19usize) & 0x01; | ||
| 8051 | val != 0 | ||
| 8052 | } | ||
| 8053 | #[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)"] | ||
| 8054 | pub fn set_busspeed(&mut self, val: bool) { | ||
| 8055 | self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); | ||
| 8056 | } | ||
| 8057 | #[doc = "Receive clock selection. These bits can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"] | ||
| 8058 | pub const fn selclkrx(&self) -> u8 { | ||
| 8059 | let val = (self.0 >> 20usize) & 0x03; | ||
| 8060 | val as u8 | ||
| 8061 | } | ||
| 8062 | #[doc = "Receive clock selection. These bits can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"] | ||
| 8063 | pub fn set_selclkrx(&mut self, val: u8) { | ||
| 8064 | self.0 = (self.0 & !(0x03 << 20usize)) | (((val as u32) & 0x03) << 20usize); | ||
| 8065 | } | ||
| 8066 | } | ||
| 8067 | impl Default for Clkcr { | ||
| 8068 | fn default() -> Clkcr { | ||
| 8069 | Clkcr(0) | ||
| 8070 | } | 6159 | } |
| 8071 | } | 6160 | } |
| 8072 | #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] | 6161 | #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] |
| @@ -8090,110 +6179,45 @@ pub mod sdmmc_v2 { | |||
| 8090 | Resp1r(0) | 6179 | Resp1r(0) |
| 8091 | } | 6180 | } |
| 8092 | } | 6181 | } |
| 8093 | #[doc = "SDMMC IP identification register"] | 6182 | #[doc = "SDMMC command response register"] |
| 8094 | #[repr(transparent)] | ||
| 8095 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8096 | pub struct Id(pub u32); | ||
| 8097 | impl Id { | ||
| 8098 | #[doc = "SDMMC IP identification."] | ||
| 8099 | pub const fn ip_id(&self) -> u32 { | ||
| 8100 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 8101 | val as u32 | ||
| 8102 | } | ||
| 8103 | #[doc = "SDMMC IP identification."] | ||
| 8104 | pub fn set_ip_id(&mut self, val: u32) { | ||
| 8105 | self.0 = | ||
| 8106 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 8107 | } | ||
| 8108 | } | ||
| 8109 | impl Default for Id { | ||
| 8110 | fn default() -> Id { | ||
| 8111 | Id(0) | ||
| 8112 | } | ||
| 8113 | } | ||
| 8114 | #[doc = "SDMMC power control register"] | ||
| 8115 | #[repr(transparent)] | 6183 | #[repr(transparent)] |
| 8116 | #[derive(Copy, Clone, Eq, PartialEq)] | 6184 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8117 | pub struct Power(pub u32); | 6185 | pub struct Respcmdr(pub u32); |
| 8118 | impl Power { | 6186 | impl Respcmdr { |
| 8119 | #[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."] | 6187 | #[doc = "Response command index"] |
| 8120 | pub const fn pwrctrl(&self) -> u8 { | 6188 | pub const fn respcmd(&self) -> u8 { |
| 8121 | let val = (self.0 >> 0usize) & 0x03; | 6189 | let val = (self.0 >> 0usize) & 0x3f; |
| 8122 | val as u8 | 6190 | val as u8 |
| 8123 | } | 6191 | } |
| 8124 | #[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."] | 6192 | #[doc = "Response command index"] |
| 8125 | pub fn set_pwrctrl(&mut self, val: u8) { | 6193 | pub fn set_respcmd(&mut self, val: u8) { |
| 8126 | self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); | 6194 | self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); |
| 8127 | } | ||
| 8128 | #[doc = "Voltage switch sequence start. This bit is used to start the timing critical section of the voltage switch sequence:"] | ||
| 8129 | pub const fn vswitch(&self) -> bool { | ||
| 8130 | let val = (self.0 >> 2usize) & 0x01; | ||
| 8131 | val != 0 | ||
| 8132 | } | ||
| 8133 | #[doc = "Voltage switch sequence start. This bit is used to start the timing critical section of the voltage switch sequence:"] | ||
| 8134 | pub fn set_vswitch(&mut self, val: bool) { | ||
| 8135 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | ||
| 8136 | } | ||
| 8137 | #[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:"] | ||
| 8138 | pub const fn vswitchen(&self) -> bool { | ||
| 8139 | let val = (self.0 >> 3usize) & 0x01; | ||
| 8140 | val != 0 | ||
| 8141 | } | ||
| 8142 | #[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:"] | ||
| 8143 | pub fn set_vswitchen(&mut self, val: bool) { | ||
| 8144 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | ||
| 8145 | } | ||
| 8146 | #[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)."] | ||
| 8147 | pub const fn dirpol(&self) -> bool { | ||
| 8148 | let val = (self.0 >> 4usize) & 0x01; | ||
| 8149 | val != 0 | ||
| 8150 | } | ||
| 8151 | #[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)."] | ||
| 8152 | pub fn set_dirpol(&mut self, val: bool) { | ||
| 8153 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | ||
| 8154 | } | 6195 | } |
| 8155 | } | 6196 | } |
| 8156 | impl Default for Power { | 6197 | impl Default for Respcmdr { |
| 8157 | fn default() -> Power { | 6198 | fn default() -> Respcmdr { |
| 8158 | Power(0) | 6199 | Respcmdr(0) |
| 8159 | } | 6200 | } |
| 8160 | } | 6201 | } |
| 8161 | #[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."] | 6202 | #[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."] |
| 8162 | #[repr(transparent)] | 6203 | #[repr(transparent)] |
| 8163 | #[derive(Copy, Clone, Eq, PartialEq)] | 6204 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8164 | pub struct Idmactrlr(pub u32); | 6205 | pub struct Dtimer(pub u32); |
| 8165 | impl Idmactrlr { | 6206 | impl Dtimer { |
| 8166 | #[doc = "IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | 6207 | #[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."] |
| 8167 | pub const fn idmaen(&self) -> bool { | 6208 | pub const fn datatime(&self) -> u32 { |
| 8168 | let val = (self.0 >> 0usize) & 0x01; | 6209 | let val = (self.0 >> 0usize) & 0xffff_ffff; |
| 8169 | val != 0 | 6210 | val as u32 |
| 8170 | } | ||
| 8171 | #[doc = "IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | ||
| 8172 | pub fn set_idmaen(&mut self, val: bool) { | ||
| 8173 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 8174 | } | ||
| 8175 | #[doc = "Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | ||
| 8176 | pub const fn idmabmode(&self) -> bool { | ||
| 8177 | let val = (self.0 >> 1usize) & 0x01; | ||
| 8178 | val != 0 | ||
| 8179 | } | ||
| 8180 | #[doc = "Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | ||
| 8181 | pub fn set_idmabmode(&mut self, val: bool) { | ||
| 8182 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 8183 | } | ||
| 8184 | #[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."] | ||
| 8185 | pub const fn idmabact(&self) -> bool { | ||
| 8186 | let val = (self.0 >> 2usize) & 0x01; | ||
| 8187 | val != 0 | ||
| 8188 | } | 6211 | } |
| 8189 | #[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."] | 6212 | #[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."] |
| 8190 | pub fn set_idmabact(&mut self, val: bool) { | 6213 | pub fn set_datatime(&mut self, val: u32) { |
| 8191 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | 6214 | self.0 = |
| 6215 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 8192 | } | 6216 | } |
| 8193 | } | 6217 | } |
| 8194 | impl Default for Idmactrlr { | 6218 | impl Default for Dtimer { |
| 8195 | fn default() -> Idmactrlr { | 6219 | fn default() -> Dtimer { |
| 8196 | Idmactrlr(0) | 6220 | Dtimer(0) |
| 8197 | } | 6221 | } |
| 8198 | } | 6222 | } |
| 8199 | #[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."] | 6223 | #[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."] |
| @@ -8387,25 +6411,25 @@ pub mod sdmmc_v2 { | |||
| 8387 | Icr(0) | 6411 | Icr(0) |
| 8388 | } | 6412 | } |
| 8389 | } | 6413 | } |
| 8390 | #[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."] | 6414 | #[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."] |
| 8391 | #[repr(transparent)] | 6415 | #[repr(transparent)] |
| 8392 | #[derive(Copy, Clone, Eq, PartialEq)] | 6416 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8393 | pub struct Dlenr(pub u32); | 6417 | pub struct Dcntr(pub u32); |
| 8394 | impl Dlenr { | 6418 | impl Dcntr { |
| 8395 | #[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."] | 6419 | #[doc = "Data count value When read, the number of remaining data bytes to be transferred is returned. Write has no effect."] |
| 8396 | pub const fn datalength(&self) -> u32 { | 6420 | pub const fn datacount(&self) -> u32 { |
| 8397 | let val = (self.0 >> 0usize) & 0x01ff_ffff; | 6421 | let val = (self.0 >> 0usize) & 0x01ff_ffff; |
| 8398 | val as u32 | 6422 | val as u32 |
| 8399 | } | 6423 | } |
| 8400 | #[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."] | 6424 | #[doc = "Data count value When read, the number of remaining data bytes to be transferred is returned. Write has no effect."] |
| 8401 | pub fn set_datalength(&mut self, val: u32) { | 6425 | pub fn set_datacount(&mut self, val: u32) { |
| 8402 | self.0 = | 6426 | self.0 = |
| 8403 | (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize); | 6427 | (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize); |
| 8404 | } | 6428 | } |
| 8405 | } | 6429 | } |
| 8406 | impl Default for Dlenr { | 6430 | impl Default for Dcntr { |
| 8407 | fn default() -> Dlenr { | 6431 | fn default() -> Dcntr { |
| 8408 | Dlenr(0) | 6432 | Dcntr(0) |
| 8409 | } | 6433 | } |
| 8410 | } | 6434 | } |
| 8411 | #[doc = "The SDMMC_IDMABSIZER register contains the buffers size when in double buffer configuration."] | 6435 | #[doc = "The SDMMC_IDMABSIZER register contains the buffers size when in double buffer configuration."] |
| @@ -8428,24 +6452,25 @@ pub mod sdmmc_v2 { | |||
| 8428 | Idmabsizer(0) | 6452 | Idmabsizer(0) |
| 8429 | } | 6453 | } |
| 8430 | } | 6454 | } |
| 8431 | #[doc = "SDMMC command response register"] | 6455 | #[doc = "SDMMC IP identification register"] |
| 8432 | #[repr(transparent)] | 6456 | #[repr(transparent)] |
| 8433 | #[derive(Copy, Clone, Eq, PartialEq)] | 6457 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8434 | pub struct Respcmdr(pub u32); | 6458 | pub struct Id(pub u32); |
| 8435 | impl Respcmdr { | 6459 | impl Id { |
| 8436 | #[doc = "Response command index"] | 6460 | #[doc = "SDMMC IP identification."] |
| 8437 | pub const fn respcmd(&self) -> u8 { | 6461 | pub const fn ip_id(&self) -> u32 { |
| 8438 | let val = (self.0 >> 0usize) & 0x3f; | 6462 | let val = (self.0 >> 0usize) & 0xffff_ffff; |
| 8439 | val as u8 | 6463 | val as u32 |
| 8440 | } | 6464 | } |
| 8441 | #[doc = "Response command index"] | 6465 | #[doc = "SDMMC IP identification."] |
| 8442 | pub fn set_respcmd(&mut self, val: u8) { | 6466 | pub fn set_ip_id(&mut self, val: u32) { |
| 8443 | self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); | 6467 | self.0 = |
| 6468 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 8444 | } | 6469 | } |
| 8445 | } | 6470 | } |
| 8446 | impl Default for Respcmdr { | 6471 | impl Default for Id { |
| 8447 | fn default() -> Respcmdr { | 6472 | fn default() -> Id { |
| 8448 | Respcmdr(0) | 6473 | Id(0) |
| 8449 | } | 6474 | } |
| 8450 | } | 6475 | } |
| 8451 | #[doc = "The SDMMC_IDMABASE1R register contains the double buffer configuration second buffer memory base address."] | 6476 | #[doc = "The SDMMC_IDMABASE1R register contains the double buffer configuration second buffer memory base address."] |
| @@ -8471,71 +6496,6 @@ are always 0 and read only). This register can be written by firmware when DPSM | |||
| 8471 | Idmabase1r(0) | 6496 | Idmabase1r(0) |
| 8472 | } | 6497 | } |
| 8473 | } | 6498 | } |
| 8474 | #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] | ||
| 8475 | #[repr(transparent)] | ||
| 8476 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8477 | pub struct Resp2r(pub u32); | ||
| 8478 | impl Resp2r { | ||
| 8479 | #[doc = "see Table404."] | ||
| 8480 | pub const fn cardstatus2(&self) -> u32 { | ||
| 8481 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 8482 | val as u32 | ||
| 8483 | } | ||
| 8484 | #[doc = "see Table404."] | ||
| 8485 | pub fn set_cardstatus2(&mut self, val: u32) { | ||
| 8486 | self.0 = | ||
| 8487 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 8488 | } | ||
| 8489 | } | ||
| 8490 | impl Default for Resp2r { | ||
| 8491 | fn default() -> Resp2r { | ||
| 8492 | Resp2r(0) | ||
| 8493 | } | ||
| 8494 | } | ||
| 8495 | #[doc = "The SDMMC_ARGR register contains a 32-bit command argument, which is sent to a card as part of a command message."] | ||
| 8496 | #[repr(transparent)] | ||
| 8497 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8498 | pub struct Argr(pub u32); | ||
| 8499 | impl Argr { | ||
| 8500 | #[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."] | ||
| 8501 | pub const fn cmdarg(&self) -> u32 { | ||
| 8502 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 8503 | val as u32 | ||
| 8504 | } | ||
| 8505 | #[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."] | ||
| 8506 | pub fn set_cmdarg(&mut self, val: u32) { | ||
| 8507 | self.0 = | ||
| 8508 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 8509 | } | ||
| 8510 | } | ||
| 8511 | impl Default for Argr { | ||
| 8512 | fn default() -> Argr { | ||
| 8513 | Argr(0) | ||
| 8514 | } | ||
| 8515 | } | ||
| 8516 | #[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."] | ||
| 8517 | #[repr(transparent)] | ||
| 8518 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8519 | pub struct Idmabase0r(pub u32); | ||
| 8520 | impl Idmabase0r { | ||
| 8521 | #[doc = "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0] | ||
| 8522 | 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)."] | ||
| 8523 | pub const fn idmabase0(&self) -> u32 { | ||
| 8524 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 8525 | val as u32 | ||
| 8526 | } | ||
| 8527 | #[doc = "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0] | ||
| 8528 | 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)."] | ||
| 8529 | pub fn set_idmabase0(&mut self, val: u32) { | ||
| 8530 | self.0 = | ||
| 8531 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 8532 | } | ||
| 8533 | } | ||
| 8534 | impl Default for Idmabase0r { | ||
| 8535 | fn default() -> Idmabase0r { | ||
| 8536 | Idmabase0r(0) | ||
| 8537 | } | ||
| 8538 | } | ||
| 8539 | #[doc = "The interrupt mask register determines which status flags generate an interrupt request by setting the corresponding bit to 1."] | 6499 | #[doc = "The interrupt mask register determines which status flags generate an interrupt request by setting the corresponding bit to 1."] |
| 8540 | #[repr(transparent)] | 6500 | #[repr(transparent)] |
| 8541 | #[derive(Copy, Clone, Eq, PartialEq)] | 6501 | #[derive(Copy, Clone, Eq, PartialEq)] |
| @@ -8754,25 +6714,96 @@ are always 0 and read only). This register can be written by firmware when DPSM | |||
| 8754 | Maskr(0) | 6714 | Maskr(0) |
| 8755 | } | 6715 | } |
| 8756 | } | 6716 | } |
| 8757 | #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] | 6717 | #[doc = "SDMMC IP version register"] |
| 8758 | #[repr(transparent)] | 6718 | #[repr(transparent)] |
| 8759 | #[derive(Copy, Clone, Eq, PartialEq)] | 6719 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8760 | pub struct Resp3r(pub u32); | 6720 | pub struct Ver(pub u32); |
| 8761 | impl Resp3r { | 6721 | impl Ver { |
| 8762 | #[doc = "see Table404."] | 6722 | #[doc = "IP minor revision number."] |
| 8763 | pub const fn cardstatus3(&self) -> u32 { | 6723 | pub const fn minrev(&self) -> u8 { |
| 6724 | let val = (self.0 >> 0usize) & 0x0f; | ||
| 6725 | val as u8 | ||
| 6726 | } | ||
| 6727 | #[doc = "IP minor revision number."] | ||
| 6728 | pub fn set_minrev(&mut self, val: u8) { | ||
| 6729 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); | ||
| 6730 | } | ||
| 6731 | #[doc = "IP major revision number."] | ||
| 6732 | pub const fn majrev(&self) -> u8 { | ||
| 6733 | let val = (self.0 >> 4usize) & 0x0f; | ||
| 6734 | val as u8 | ||
| 6735 | } | ||
| 6736 | #[doc = "IP major revision number."] | ||
| 6737 | pub fn set_majrev(&mut self, val: u8) { | ||
| 6738 | self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); | ||
| 6739 | } | ||
| 6740 | } | ||
| 6741 | impl Default for Ver { | ||
| 6742 | fn default() -> Ver { | ||
| 6743 | Ver(0) | ||
| 6744 | } | ||
| 6745 | } | ||
| 6746 | #[doc = "The SDMMC_ARGR register contains a 32-bit command argument, which is sent to a card as part of a command message."] | ||
| 6747 | #[repr(transparent)] | ||
| 6748 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6749 | pub struct Argr(pub u32); | ||
| 6750 | impl Argr { | ||
| 6751 | #[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."] | ||
| 6752 | pub const fn cmdarg(&self) -> u32 { | ||
| 8764 | let val = (self.0 >> 0usize) & 0xffff_ffff; | 6753 | let val = (self.0 >> 0usize) & 0xffff_ffff; |
| 8765 | val as u32 | 6754 | val as u32 |
| 8766 | } | 6755 | } |
| 8767 | #[doc = "see Table404."] | 6756 | #[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."] |
| 8768 | pub fn set_cardstatus3(&mut self, val: u32) { | 6757 | pub fn set_cmdarg(&mut self, val: u32) { |
| 8769 | self.0 = | 6758 | self.0 = |
| 8770 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | 6759 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); |
| 8771 | } | 6760 | } |
| 8772 | } | 6761 | } |
| 8773 | impl Default for Resp3r { | 6762 | impl Default for Argr { |
| 8774 | fn default() -> Resp3r { | 6763 | fn default() -> Argr { |
| 8775 | Resp3r(0) | 6764 | Argr(0) |
| 6765 | } | ||
| 6766 | } | ||
| 6767 | #[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."] | ||
| 6768 | #[repr(transparent)] | ||
| 6769 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6770 | pub struct Acktimer(pub u32); | ||
| 6771 | impl Acktimer { | ||
| 6772 | #[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."] | ||
| 6773 | pub const fn acktime(&self) -> u32 { | ||
| 6774 | let val = (self.0 >> 0usize) & 0x01ff_ffff; | ||
| 6775 | val as u32 | ||
| 6776 | } | ||
| 6777 | #[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."] | ||
| 6778 | pub fn set_acktime(&mut self, val: u32) { | ||
| 6779 | self.0 = | ||
| 6780 | (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize); | ||
| 6781 | } | ||
| 6782 | } | ||
| 6783 | impl Default for Acktimer { | ||
| 6784 | fn default() -> Acktimer { | ||
| 6785 | Acktimer(0) | ||
| 6786 | } | ||
| 6787 | } | ||
| 6788 | #[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."] | ||
| 6789 | #[repr(transparent)] | ||
| 6790 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6791 | pub struct Fifor(pub u32); | ||
| 6792 | impl Fifor { | ||
| 6793 | #[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."] | ||
| 6794 | pub const fn fifodata(&self) -> u32 { | ||
| 6795 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 6796 | val as u32 | ||
| 6797 | } | ||
| 6798 | #[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."] | ||
| 6799 | pub fn set_fifodata(&mut self, val: u32) { | ||
| 6800 | self.0 = | ||
| 6801 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 6802 | } | ||
| 6803 | } | ||
| 6804 | impl Default for Fifor { | ||
| 6805 | fn default() -> Fifor { | ||
| 6806 | Fifor(0) | ||
| 8776 | } | 6807 | } |
| 8777 | } | 6808 | } |
| 8778 | #[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)."] | 6809 | #[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)."] |
| @@ -8885,218 +6916,2111 @@ are always 0 and read only). This register can be written by firmware when DPSM | |||
| 8885 | Cmdr(0) | 6916 | Cmdr(0) |
| 8886 | } | 6917 | } |
| 8887 | } | 6918 | } |
| 8888 | #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] | 6919 | #[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."] |
| 8889 | #[repr(transparent)] | 6920 | #[repr(transparent)] |
| 8890 | #[derive(Copy, Clone, Eq, PartialEq)] | 6921 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8891 | pub struct Resp4r(pub u32); | 6922 | pub struct Idmactrlr(pub u32); |
| 8892 | impl Resp4r { | 6923 | impl Idmactrlr { |
| 8893 | #[doc = "see Table404."] | 6924 | #[doc = "IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 8894 | pub const fn cardstatus4(&self) -> u32 { | 6925 | pub const fn idmaen(&self) -> bool { |
| 8895 | let val = (self.0 >> 0usize) & 0xffff_ffff; | 6926 | let val = (self.0 >> 0usize) & 0x01; |
| 8896 | val as u32 | 6927 | val != 0 |
| 8897 | } | 6928 | } |
| 8898 | #[doc = "see Table404."] | 6929 | #[doc = "IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 8899 | pub fn set_cardstatus4(&mut self, val: u32) { | 6930 | pub fn set_idmaen(&mut self, val: bool) { |
| 8900 | self.0 = | 6931 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 8901 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | 6932 | } |
| 6933 | #[doc = "Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | ||
| 6934 | pub const fn idmabmode(&self) -> bool { | ||
| 6935 | let val = (self.0 >> 1usize) & 0x01; | ||
| 6936 | val != 0 | ||
| 6937 | } | ||
| 6938 | #[doc = "Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | ||
| 6939 | pub fn set_idmabmode(&mut self, val: bool) { | ||
| 6940 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 6941 | } | ||
| 6942 | #[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."] | ||
| 6943 | pub const fn idmabact(&self) -> bool { | ||
| 6944 | let val = (self.0 >> 2usize) & 0x01; | ||
| 6945 | val != 0 | ||
| 6946 | } | ||
| 6947 | #[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."] | ||
| 6948 | pub fn set_idmabact(&mut self, val: bool) { | ||
| 6949 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | ||
| 8902 | } | 6950 | } |
| 8903 | } | 6951 | } |
| 8904 | impl Default for Resp4r { | 6952 | impl Default for Idmactrlr { |
| 8905 | fn default() -> Resp4r { | 6953 | fn default() -> Idmactrlr { |
| 8906 | Resp4r(0) | 6954 | Idmactrlr(0) |
| 8907 | } | 6955 | } |
| 8908 | } | 6956 | } |
| 8909 | #[doc = "SDMMC IP version register"] | 6957 | #[doc = "SDMMC power control register"] |
| 8910 | #[repr(transparent)] | 6958 | #[repr(transparent)] |
| 8911 | #[derive(Copy, Clone, Eq, PartialEq)] | 6959 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8912 | pub struct Ver(pub u32); | 6960 | pub struct Power(pub u32); |
| 8913 | impl Ver { | 6961 | impl Power { |
| 8914 | #[doc = "IP minor revision number."] | 6962 | #[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."] |
| 8915 | pub const fn minrev(&self) -> u8 { | 6963 | pub const fn pwrctrl(&self) -> u8 { |
| 8916 | let val = (self.0 >> 0usize) & 0x0f; | 6964 | let val = (self.0 >> 0usize) & 0x03; |
| 8917 | val as u8 | 6965 | val as u8 |
| 8918 | } | 6966 | } |
| 8919 | #[doc = "IP minor revision number."] | 6967 | #[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."] |
| 8920 | pub fn set_minrev(&mut self, val: u8) { | 6968 | pub fn set_pwrctrl(&mut self, val: u8) { |
| 8921 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); | 6969 | self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); |
| 8922 | } | 6970 | } |
| 8923 | #[doc = "IP major revision number."] | 6971 | #[doc = "Voltage switch sequence start. This bit is used to start the timing critical section of the voltage switch sequence:"] |
| 8924 | pub const fn majrev(&self) -> u8 { | 6972 | pub const fn vswitch(&self) -> bool { |
| 8925 | let val = (self.0 >> 4usize) & 0x0f; | 6973 | let val = (self.0 >> 2usize) & 0x01; |
| 8926 | val as u8 | 6974 | val != 0 |
| 8927 | } | 6975 | } |
| 8928 | #[doc = "IP major revision number."] | 6976 | #[doc = "Voltage switch sequence start. This bit is used to start the timing critical section of the voltage switch sequence:"] |
| 8929 | pub fn set_majrev(&mut self, val: u8) { | 6977 | pub fn set_vswitch(&mut self, val: bool) { |
| 8930 | self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); | 6978 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); |
| 6979 | } | ||
| 6980 | #[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:"] | ||
| 6981 | pub const fn vswitchen(&self) -> bool { | ||
| 6982 | let val = (self.0 >> 3usize) & 0x01; | ||
| 6983 | val != 0 | ||
| 6984 | } | ||
| 6985 | #[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:"] | ||
| 6986 | pub fn set_vswitchen(&mut self, val: bool) { | ||
| 6987 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | ||
| 6988 | } | ||
| 6989 | #[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)."] | ||
| 6990 | pub const fn dirpol(&self) -> bool { | ||
| 6991 | let val = (self.0 >> 4usize) & 0x01; | ||
| 6992 | val != 0 | ||
| 6993 | } | ||
| 6994 | #[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)."] | ||
| 6995 | pub fn set_dirpol(&mut self, val: bool) { | ||
| 6996 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | ||
| 8931 | } | 6997 | } |
| 8932 | } | 6998 | } |
| 8933 | impl Default for Ver { | 6999 | impl Default for Power { |
| 8934 | fn default() -> Ver { | 7000 | fn default() -> Power { |
| 8935 | Ver(0) | 7001 | Power(0) |
| 8936 | } | 7002 | } |
| 8937 | } | 7003 | } |
| 8938 | #[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."] | 7004 | #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] |
| 8939 | #[repr(transparent)] | 7005 | #[repr(transparent)] |
| 8940 | #[derive(Copy, Clone, Eq, PartialEq)] | 7006 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8941 | pub struct Dcntr(pub u32); | 7007 | pub struct Resp2r(pub u32); |
| 8942 | impl Dcntr { | 7008 | impl Resp2r { |
| 8943 | #[doc = "Data count value When read, the number of remaining data bytes to be transferred is returned. Write has no effect."] | 7009 | #[doc = "see Table404."] |
| 8944 | pub const fn datacount(&self) -> u32 { | 7010 | pub const fn cardstatus2(&self) -> u32 { |
| 8945 | let val = (self.0 >> 0usize) & 0x01ff_ffff; | 7011 | let val = (self.0 >> 0usize) & 0xffff_ffff; |
| 8946 | val as u32 | 7012 | val as u32 |
| 8947 | } | 7013 | } |
| 8948 | #[doc = "Data count value When read, the number of remaining data bytes to be transferred is returned. Write has no effect."] | 7014 | #[doc = "see Table404."] |
| 8949 | pub fn set_datacount(&mut self, val: u32) { | 7015 | pub fn set_cardstatus2(&mut self, val: u32) { |
| 8950 | self.0 = | 7016 | self.0 = |
| 8951 | (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize); | 7017 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); |
| 8952 | } | 7018 | } |
| 8953 | } | 7019 | } |
| 8954 | impl Default for Dcntr { | 7020 | impl Default for Resp2r { |
| 8955 | fn default() -> Dcntr { | 7021 | fn default() -> Resp2r { |
| 8956 | Dcntr(0) | 7022 | Resp2r(0) |
| 8957 | } | 7023 | } |
| 8958 | } | 7024 | } |
| 8959 | #[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."] | 7025 | #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] |
| 8960 | #[repr(transparent)] | 7026 | #[repr(transparent)] |
| 8961 | #[derive(Copy, Clone, Eq, PartialEq)] | 7027 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8962 | pub struct Dtimer(pub u32); | 7028 | pub struct Resp3r(pub u32); |
| 8963 | impl Dtimer { | 7029 | impl Resp3r { |
| 8964 | #[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."] | 7030 | #[doc = "see Table404."] |
| 8965 | pub const fn datatime(&self) -> u32 { | 7031 | pub const fn cardstatus3(&self) -> u32 { |
| 8966 | let val = (self.0 >> 0usize) & 0xffff_ffff; | 7032 | let val = (self.0 >> 0usize) & 0xffff_ffff; |
| 8967 | val as u32 | 7033 | val as u32 |
| 8968 | } | 7034 | } |
| 8969 | #[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."] | 7035 | #[doc = "see Table404."] |
| 8970 | pub fn set_datatime(&mut self, val: u32) { | 7036 | pub fn set_cardstatus3(&mut self, val: u32) { |
| 8971 | self.0 = | 7037 | self.0 = |
| 8972 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | 7038 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); |
| 8973 | } | 7039 | } |
| 8974 | } | 7040 | } |
| 8975 | impl Default for Dtimer { | 7041 | impl Default for Resp3r { |
| 8976 | fn default() -> Dtimer { | 7042 | fn default() -> Resp3r { |
| 8977 | Dtimer(0) | 7043 | Resp3r(0) |
| 8978 | } | 7044 | } |
| 8979 | } | 7045 | } |
| 8980 | #[doc = "The SDMMC_DCTRL register control the data path state machine (DPSM)."] | 7046 | } |
| 7047 | } | ||
| 7048 | pub mod dma_v1 { | ||
| 7049 | use crate::generic::*; | ||
| 7050 | #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"] | ||
| 7051 | #[derive(Copy, Clone)] | ||
| 7052 | pub struct Ch(pub *mut u8); | ||
| 7053 | unsafe impl Send for Ch {} | ||
| 7054 | unsafe impl Sync for Ch {} | ||
| 7055 | impl Ch { | ||
| 7056 | #[doc = "DMA channel configuration register (DMA_CCR)"] | ||
| 7057 | pub fn cr(self) -> Reg<regs::Cr, RW> { | ||
| 7058 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 7059 | } | ||
| 7060 | #[doc = "DMA channel 1 number of data register"] | ||
| 7061 | pub fn ndtr(self) -> Reg<regs::Ndtr, RW> { | ||
| 7062 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 7063 | } | ||
| 7064 | #[doc = "DMA channel 1 peripheral address register"] | ||
| 7065 | pub fn par(self) -> Reg<u32, RW> { | ||
| 7066 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 7067 | } | ||
| 7068 | #[doc = "DMA channel 1 memory address register"] | ||
| 7069 | pub fn mar(self) -> Reg<u32, RW> { | ||
| 7070 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 7071 | } | ||
| 7072 | } | ||
| 7073 | #[doc = "DMA controller"] | ||
| 7074 | #[derive(Copy, Clone)] | ||
| 7075 | pub struct Dma(pub *mut u8); | ||
| 7076 | unsafe impl Send for Dma {} | ||
| 7077 | unsafe impl Sync for Dma {} | ||
| 7078 | impl Dma { | ||
| 7079 | #[doc = "DMA interrupt status register (DMA_ISR)"] | ||
| 7080 | pub fn isr(self) -> Reg<regs::Isr, R> { | ||
| 7081 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 7082 | } | ||
| 7083 | #[doc = "DMA interrupt flag clear register (DMA_IFCR)"] | ||
| 7084 | pub fn ifcr(self) -> Reg<regs::Ifcr, W> { | ||
| 7085 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 7086 | } | ||
| 7087 | #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"] | ||
| 7088 | pub fn ch(self, n: usize) -> Ch { | ||
| 7089 | assert!(n < 7usize); | ||
| 7090 | unsafe { Ch(self.0.add(8usize + n * 20usize)) } | ||
| 7091 | } | ||
| 7092 | } | ||
| 7093 | pub mod vals { | ||
| 7094 | use crate::generic::*; | ||
| 7095 | #[repr(transparent)] | ||
| 7096 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7097 | pub struct Memmem(pub u8); | ||
| 7098 | impl Memmem { | ||
| 7099 | #[doc = "Memory to memory mode disabled"] | ||
| 7100 | pub const DISABLED: Self = Self(0); | ||
| 7101 | #[doc = "Memory to memory mode enabled"] | ||
| 7102 | pub const ENABLED: Self = Self(0x01); | ||
| 7103 | } | ||
| 7104 | #[repr(transparent)] | ||
| 7105 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7106 | pub struct Pl(pub u8); | ||
| 7107 | impl Pl { | ||
| 7108 | #[doc = "Low priority"] | ||
| 7109 | pub const LOW: Self = Self(0); | ||
| 7110 | #[doc = "Medium priority"] | ||
| 7111 | pub const MEDIUM: Self = Self(0x01); | ||
| 7112 | #[doc = "High priority"] | ||
| 7113 | pub const HIGH: Self = Self(0x02); | ||
| 7114 | #[doc = "Very high priority"] | ||
| 7115 | pub const VERYHIGH: Self = Self(0x03); | ||
| 7116 | } | ||
| 7117 | #[repr(transparent)] | ||
| 7118 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7119 | pub struct Circ(pub u8); | ||
| 7120 | impl Circ { | ||
| 7121 | #[doc = "Circular buffer disabled"] | ||
| 7122 | pub const DISABLED: Self = Self(0); | ||
| 7123 | #[doc = "Circular buffer enabled"] | ||
| 7124 | pub const ENABLED: Self = Self(0x01); | ||
| 7125 | } | ||
| 7126 | #[repr(transparent)] | ||
| 7127 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7128 | pub struct Dir(pub u8); | ||
| 7129 | impl Dir { | ||
| 7130 | #[doc = "Read from peripheral"] | ||
| 7131 | pub const FROMPERIPHERAL: Self = Self(0); | ||
| 7132 | #[doc = "Read from memory"] | ||
| 7133 | pub const FROMMEMORY: Self = Self(0x01); | ||
| 7134 | } | ||
| 7135 | #[repr(transparent)] | ||
| 7136 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7137 | pub struct Inc(pub u8); | ||
| 7138 | impl Inc { | ||
| 7139 | #[doc = "Increment mode disabled"] | ||
| 7140 | pub const DISABLED: Self = Self(0); | ||
| 7141 | #[doc = "Increment mode enabled"] | ||
| 7142 | pub const ENABLED: Self = Self(0x01); | ||
| 7143 | } | ||
| 7144 | #[repr(transparent)] | ||
| 7145 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7146 | pub struct Size(pub u8); | ||
| 7147 | impl Size { | ||
| 7148 | #[doc = "8-bit size"] | ||
| 7149 | pub const BITS8: Self = Self(0); | ||
| 7150 | #[doc = "16-bit size"] | ||
| 7151 | pub const BITS16: Self = Self(0x01); | ||
| 7152 | #[doc = "32-bit size"] | ||
| 7153 | pub const BITS32: Self = Self(0x02); | ||
| 7154 | } | ||
| 7155 | } | ||
| 7156 | pub mod regs { | ||
| 7157 | use crate::generic::*; | ||
| 7158 | #[doc = "DMA channel configuration register (DMA_CCR)"] | ||
| 8981 | #[repr(transparent)] | 7159 | #[repr(transparent)] |
| 8982 | #[derive(Copy, Clone, Eq, PartialEq)] | 7160 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8983 | pub struct Dctrl(pub u32); | 7161 | pub struct Cr(pub u32); |
| 8984 | impl Dctrl { | 7162 | impl Cr { |
| 8985 | #[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."] | 7163 | #[doc = "Channel enable"] |
| 8986 | pub const fn dten(&self) -> bool { | 7164 | pub const fn en(&self) -> bool { |
| 8987 | let val = (self.0 >> 0usize) & 0x01; | 7165 | let val = (self.0 >> 0usize) & 0x01; |
| 8988 | val != 0 | 7166 | val != 0 |
| 8989 | } | 7167 | } |
| 8990 | #[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."] | 7168 | #[doc = "Channel enable"] |
| 8991 | pub fn set_dten(&mut self, val: bool) { | 7169 | pub fn set_en(&mut self, val: bool) { |
| 8992 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 7170 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 8993 | } | 7171 | } |
| 8994 | #[doc = "Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | 7172 | #[doc = "Transfer complete interrupt enable"] |
| 8995 | pub const fn dtdir(&self) -> bool { | 7173 | pub const fn tcie(&self) -> bool { |
| 8996 | let val = (self.0 >> 1usize) & 0x01; | 7174 | let val = (self.0 >> 1usize) & 0x01; |
| 8997 | val != 0 | 7175 | val != 0 |
| 8998 | } | 7176 | } |
| 8999 | #[doc = "Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | 7177 | #[doc = "Transfer complete interrupt enable"] |
| 9000 | pub fn set_dtdir(&mut self, val: bool) { | 7178 | pub fn set_tcie(&mut self, val: bool) { |
| 9001 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 7179 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 9002 | } | 7180 | } |
| 9003 | #[doc = "Data transfer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | 7181 | #[doc = "Half Transfer interrupt enable"] |
| 9004 | pub const fn dtmode(&self) -> u8 { | 7182 | pub const fn htie(&self) -> bool { |
| 9005 | let val = (self.0 >> 2usize) & 0x03; | 7183 | let val = (self.0 >> 2usize) & 0x01; |
| 9006 | val as u8 | 7184 | val != 0 |
| 9007 | } | 7185 | } |
| 9008 | #[doc = "Data transfer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | 7186 | #[doc = "Half Transfer interrupt enable"] |
| 9009 | pub fn set_dtmode(&mut self, val: u8) { | 7187 | pub fn set_htie(&mut self, val: bool) { |
| 9010 | self.0 = (self.0 & !(0x03 << 2usize)) | (((val as u32) & 0x03) << 2usize); | 7188 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); |
| 9011 | } | 7189 | } |
| 9012 | #[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)"] | 7190 | #[doc = "Transfer error interrupt enable"] |
| 9013 | pub const fn dblocksize(&self) -> u8 { | 7191 | pub const fn teie(&self) -> bool { |
| 9014 | let val = (self.0 >> 4usize) & 0x0f; | 7192 | let val = (self.0 >> 3usize) & 0x01; |
| 9015 | val as u8 | 7193 | val != 0 |
| 9016 | } | 7194 | } |
| 9017 | #[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)"] | 7195 | #[doc = "Transfer error interrupt enable"] |
| 9018 | pub fn set_dblocksize(&mut self, val: u8) { | 7196 | pub fn set_teie(&mut self, val: bool) { |
| 9019 | self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); | 7197 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); |
| 9020 | } | 7198 | } |
| 9021 | #[doc = "Read wait start. If this bit is set, read wait operation starts."] | 7199 | #[doc = "Data transfer direction"] |
| 9022 | pub const fn rwstart(&self) -> bool { | 7200 | pub const fn dir(&self) -> super::vals::Dir { |
| 7201 | let val = (self.0 >> 4usize) & 0x01; | ||
| 7202 | super::vals::Dir(val as u8) | ||
| 7203 | } | ||
| 7204 | #[doc = "Data transfer direction"] | ||
| 7205 | pub fn set_dir(&mut self, val: super::vals::Dir) { | ||
| 7206 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize); | ||
| 7207 | } | ||
| 7208 | #[doc = "Circular mode"] | ||
| 7209 | pub const fn circ(&self) -> super::vals::Circ { | ||
| 7210 | let val = (self.0 >> 5usize) & 0x01; | ||
| 7211 | super::vals::Circ(val as u8) | ||
| 7212 | } | ||
| 7213 | #[doc = "Circular mode"] | ||
| 7214 | pub fn set_circ(&mut self, val: super::vals::Circ) { | ||
| 7215 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize); | ||
| 7216 | } | ||
| 7217 | #[doc = "Peripheral increment mode"] | ||
| 7218 | pub const fn pinc(&self) -> super::vals::Inc { | ||
| 7219 | let val = (self.0 >> 6usize) & 0x01; | ||
| 7220 | super::vals::Inc(val as u8) | ||
| 7221 | } | ||
| 7222 | #[doc = "Peripheral increment mode"] | ||
| 7223 | pub fn set_pinc(&mut self, val: super::vals::Inc) { | ||
| 7224 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val.0 as u32) & 0x01) << 6usize); | ||
| 7225 | } | ||
| 7226 | #[doc = "Memory increment mode"] | ||
| 7227 | pub const fn minc(&self) -> super::vals::Inc { | ||
| 7228 | let val = (self.0 >> 7usize) & 0x01; | ||
| 7229 | super::vals::Inc(val as u8) | ||
| 7230 | } | ||
| 7231 | #[doc = "Memory increment mode"] | ||
| 7232 | pub fn set_minc(&mut self, val: super::vals::Inc) { | ||
| 7233 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); | ||
| 7234 | } | ||
| 7235 | #[doc = "Peripheral size"] | ||
| 7236 | pub const fn psize(&self) -> super::vals::Size { | ||
| 7237 | let val = (self.0 >> 8usize) & 0x03; | ||
| 7238 | super::vals::Size(val as u8) | ||
| 7239 | } | ||
| 7240 | #[doc = "Peripheral size"] | ||
| 7241 | pub fn set_psize(&mut self, val: super::vals::Size) { | ||
| 7242 | self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize); | ||
| 7243 | } | ||
| 7244 | #[doc = "Memory size"] | ||
| 7245 | pub const fn msize(&self) -> super::vals::Size { | ||
| 7246 | let val = (self.0 >> 10usize) & 0x03; | ||
| 7247 | super::vals::Size(val as u8) | ||
| 7248 | } | ||
| 7249 | #[doc = "Memory size"] | ||
| 7250 | pub fn set_msize(&mut self, val: super::vals::Size) { | ||
| 7251 | self.0 = (self.0 & !(0x03 << 10usize)) | (((val.0 as u32) & 0x03) << 10usize); | ||
| 7252 | } | ||
| 7253 | #[doc = "Channel Priority level"] | ||
| 7254 | pub const fn pl(&self) -> super::vals::Pl { | ||
| 7255 | let val = (self.0 >> 12usize) & 0x03; | ||
| 7256 | super::vals::Pl(val as u8) | ||
| 7257 | } | ||
| 7258 | #[doc = "Channel Priority level"] | ||
| 7259 | pub fn set_pl(&mut self, val: super::vals::Pl) { | ||
| 7260 | self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize); | ||
| 7261 | } | ||
| 7262 | #[doc = "Memory to memory mode"] | ||
| 7263 | pub const fn mem2mem(&self) -> super::vals::Memmem { | ||
| 7264 | let val = (self.0 >> 14usize) & 0x01; | ||
| 7265 | super::vals::Memmem(val as u8) | ||
| 7266 | } | ||
| 7267 | #[doc = "Memory to memory mode"] | ||
| 7268 | pub fn set_mem2mem(&mut self, val: super::vals::Memmem) { | ||
| 7269 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); | ||
| 7270 | } | ||
| 7271 | } | ||
| 7272 | impl Default for Cr { | ||
| 7273 | fn default() -> Cr { | ||
| 7274 | Cr(0) | ||
| 7275 | } | ||
| 7276 | } | ||
| 7277 | #[doc = "DMA interrupt flag clear register (DMA_IFCR)"] | ||
| 7278 | #[repr(transparent)] | ||
| 7279 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7280 | pub struct Ifcr(pub u32); | ||
| 7281 | impl Ifcr { | ||
| 7282 | #[doc = "Channel 1 Global interrupt clear"] | ||
| 7283 | pub fn cgif(&self, n: usize) -> bool { | ||
| 7284 | assert!(n < 7usize); | ||
| 7285 | let offs = 0usize + n * 4usize; | ||
| 7286 | let val = (self.0 >> offs) & 0x01; | ||
| 7287 | val != 0 | ||
| 7288 | } | ||
| 7289 | #[doc = "Channel 1 Global interrupt clear"] | ||
| 7290 | pub fn set_cgif(&mut self, n: usize, val: bool) { | ||
| 7291 | assert!(n < 7usize); | ||
| 7292 | let offs = 0usize + n * 4usize; | ||
| 7293 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7294 | } | ||
| 7295 | #[doc = "Channel 1 Transfer Complete clear"] | ||
| 7296 | pub fn ctcif(&self, n: usize) -> bool { | ||
| 7297 | assert!(n < 7usize); | ||
| 7298 | let offs = 1usize + n * 4usize; | ||
| 7299 | let val = (self.0 >> offs) & 0x01; | ||
| 7300 | val != 0 | ||
| 7301 | } | ||
| 7302 | #[doc = "Channel 1 Transfer Complete clear"] | ||
| 7303 | pub fn set_ctcif(&mut self, n: usize, val: bool) { | ||
| 7304 | assert!(n < 7usize); | ||
| 7305 | let offs = 1usize + n * 4usize; | ||
| 7306 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7307 | } | ||
| 7308 | #[doc = "Channel 1 Half Transfer clear"] | ||
| 7309 | pub fn chtif(&self, n: usize) -> bool { | ||
| 7310 | assert!(n < 7usize); | ||
| 7311 | let offs = 2usize + n * 4usize; | ||
| 7312 | let val = (self.0 >> offs) & 0x01; | ||
| 7313 | val != 0 | ||
| 7314 | } | ||
| 7315 | #[doc = "Channel 1 Half Transfer clear"] | ||
| 7316 | pub fn set_chtif(&mut self, n: usize, val: bool) { | ||
| 7317 | assert!(n < 7usize); | ||
| 7318 | let offs = 2usize + n * 4usize; | ||
| 7319 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7320 | } | ||
| 7321 | #[doc = "Channel 1 Transfer Error clear"] | ||
| 7322 | pub fn cteif(&self, n: usize) -> bool { | ||
| 7323 | assert!(n < 7usize); | ||
| 7324 | let offs = 3usize + n * 4usize; | ||
| 7325 | let val = (self.0 >> offs) & 0x01; | ||
| 7326 | val != 0 | ||
| 7327 | } | ||
| 7328 | #[doc = "Channel 1 Transfer Error clear"] | ||
| 7329 | pub fn set_cteif(&mut self, n: usize, val: bool) { | ||
| 7330 | assert!(n < 7usize); | ||
| 7331 | let offs = 3usize + n * 4usize; | ||
| 7332 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7333 | } | ||
| 7334 | } | ||
| 7335 | impl Default for Ifcr { | ||
| 7336 | fn default() -> Ifcr { | ||
| 7337 | Ifcr(0) | ||
| 7338 | } | ||
| 7339 | } | ||
| 7340 | #[doc = "DMA channel 1 number of data register"] | ||
| 7341 | #[repr(transparent)] | ||
| 7342 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7343 | pub struct Ndtr(pub u32); | ||
| 7344 | impl Ndtr { | ||
| 7345 | #[doc = "Number of data to transfer"] | ||
| 7346 | pub const fn ndt(&self) -> u16 { | ||
| 7347 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 7348 | val as u16 | ||
| 7349 | } | ||
| 7350 | #[doc = "Number of data to transfer"] | ||
| 7351 | pub fn set_ndt(&mut self, val: u16) { | ||
| 7352 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 7353 | } | ||
| 7354 | } | ||
| 7355 | impl Default for Ndtr { | ||
| 7356 | fn default() -> Ndtr { | ||
| 7357 | Ndtr(0) | ||
| 7358 | } | ||
| 7359 | } | ||
| 7360 | #[doc = "DMA interrupt status register (DMA_ISR)"] | ||
| 7361 | #[repr(transparent)] | ||
| 7362 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7363 | pub struct Isr(pub u32); | ||
| 7364 | impl Isr { | ||
| 7365 | #[doc = "Channel 1 Global interrupt flag"] | ||
| 7366 | pub fn gif(&self, n: usize) -> bool { | ||
| 7367 | assert!(n < 7usize); | ||
| 7368 | let offs = 0usize + n * 4usize; | ||
| 7369 | let val = (self.0 >> offs) & 0x01; | ||
| 7370 | val != 0 | ||
| 7371 | } | ||
| 7372 | #[doc = "Channel 1 Global interrupt flag"] | ||
| 7373 | pub fn set_gif(&mut self, n: usize, val: bool) { | ||
| 7374 | assert!(n < 7usize); | ||
| 7375 | let offs = 0usize + n * 4usize; | ||
| 7376 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7377 | } | ||
| 7378 | #[doc = "Channel 1 Transfer Complete flag"] | ||
| 7379 | pub fn tcif(&self, n: usize) -> bool { | ||
| 7380 | assert!(n < 7usize); | ||
| 7381 | let offs = 1usize + n * 4usize; | ||
| 7382 | let val = (self.0 >> offs) & 0x01; | ||
| 7383 | val != 0 | ||
| 7384 | } | ||
| 7385 | #[doc = "Channel 1 Transfer Complete flag"] | ||
| 7386 | pub fn set_tcif(&mut self, n: usize, val: bool) { | ||
| 7387 | assert!(n < 7usize); | ||
| 7388 | let offs = 1usize + n * 4usize; | ||
| 7389 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7390 | } | ||
| 7391 | #[doc = "Channel 1 Half Transfer Complete flag"] | ||
| 7392 | pub fn htif(&self, n: usize) -> bool { | ||
| 7393 | assert!(n < 7usize); | ||
| 7394 | let offs = 2usize + n * 4usize; | ||
| 7395 | let val = (self.0 >> offs) & 0x01; | ||
| 7396 | val != 0 | ||
| 7397 | } | ||
| 7398 | #[doc = "Channel 1 Half Transfer Complete flag"] | ||
| 7399 | pub fn set_htif(&mut self, n: usize, val: bool) { | ||
| 7400 | assert!(n < 7usize); | ||
| 7401 | let offs = 2usize + n * 4usize; | ||
| 7402 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7403 | } | ||
| 7404 | #[doc = "Channel 1 Transfer Error flag"] | ||
| 7405 | pub fn teif(&self, n: usize) -> bool { | ||
| 7406 | assert!(n < 7usize); | ||
| 7407 | let offs = 3usize + n * 4usize; | ||
| 7408 | let val = (self.0 >> offs) & 0x01; | ||
| 7409 | val != 0 | ||
| 7410 | } | ||
| 7411 | #[doc = "Channel 1 Transfer Error flag"] | ||
| 7412 | pub fn set_teif(&mut self, n: usize, val: bool) { | ||
| 7413 | assert!(n < 7usize); | ||
| 7414 | let offs = 3usize + n * 4usize; | ||
| 7415 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7416 | } | ||
| 7417 | } | ||
| 7418 | impl Default for Isr { | ||
| 7419 | fn default() -> Isr { | ||
| 7420 | Isr(0) | ||
| 7421 | } | ||
| 7422 | } | ||
| 7423 | } | ||
| 7424 | } | ||
| 7425 | pub mod spi_v2 { | ||
| 7426 | use crate::generic::*; | ||
| 7427 | #[doc = "Serial peripheral interface"] | ||
| 7428 | #[derive(Copy, Clone)] | ||
| 7429 | pub struct Spi(pub *mut u8); | ||
| 7430 | unsafe impl Send for Spi {} | ||
| 7431 | unsafe impl Sync for Spi {} | ||
| 7432 | impl Spi { | ||
| 7433 | #[doc = "control register 1"] | ||
| 7434 | pub fn cr1(self) -> Reg<regs::Cr1, RW> { | ||
| 7435 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 7436 | } | ||
| 7437 | #[doc = "control register 2"] | ||
| 7438 | pub fn cr2(self) -> Reg<regs::Cr2, RW> { | ||
| 7439 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 7440 | } | ||
| 7441 | #[doc = "status register"] | ||
| 7442 | pub fn sr(self) -> Reg<regs::Sr, RW> { | ||
| 7443 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 7444 | } | ||
| 7445 | #[doc = "data register"] | ||
| 7446 | pub fn dr(self) -> Reg<regs::Dr, RW> { | ||
| 7447 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 7448 | } | ||
| 7449 | #[doc = "CRC polynomial register"] | ||
| 7450 | pub fn crcpr(self) -> Reg<regs::Crcpr, RW> { | ||
| 7451 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 7452 | } | ||
| 7453 | #[doc = "RX CRC register"] | ||
| 7454 | pub fn rxcrcr(self) -> Reg<regs::Rxcrcr, R> { | ||
| 7455 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | ||
| 7456 | } | ||
| 7457 | #[doc = "TX CRC register"] | ||
| 7458 | pub fn txcrcr(self) -> Reg<regs::Txcrcr, R> { | ||
| 7459 | unsafe { Reg::from_ptr(self.0.add(24usize)) } | ||
| 7460 | } | ||
| 7461 | } | ||
| 7462 | pub mod regs { | ||
| 7463 | use crate::generic::*; | ||
| 7464 | #[doc = "control register 1"] | ||
| 7465 | #[repr(transparent)] | ||
| 7466 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7467 | pub struct Cr1(pub u32); | ||
| 7468 | impl Cr1 { | ||
| 7469 | #[doc = "Clock phase"] | ||
| 7470 | pub const fn cpha(&self) -> super::vals::Cpha { | ||
| 7471 | let val = (self.0 >> 0usize) & 0x01; | ||
| 7472 | super::vals::Cpha(val as u8) | ||
| 7473 | } | ||
| 7474 | #[doc = "Clock phase"] | ||
| 7475 | pub fn set_cpha(&mut self, val: super::vals::Cpha) { | ||
| 7476 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val.0 as u32) & 0x01) << 0usize); | ||
| 7477 | } | ||
| 7478 | #[doc = "Clock polarity"] | ||
| 7479 | pub const fn cpol(&self) -> super::vals::Cpol { | ||
| 7480 | let val = (self.0 >> 1usize) & 0x01; | ||
| 7481 | super::vals::Cpol(val as u8) | ||
| 7482 | } | ||
| 7483 | #[doc = "Clock polarity"] | ||
| 7484 | pub fn set_cpol(&mut self, val: super::vals::Cpol) { | ||
| 7485 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val.0 as u32) & 0x01) << 1usize); | ||
| 7486 | } | ||
| 7487 | #[doc = "Master selection"] | ||
| 7488 | pub const fn mstr(&self) -> super::vals::Mstr { | ||
| 7489 | let val = (self.0 >> 2usize) & 0x01; | ||
| 7490 | super::vals::Mstr(val as u8) | ||
| 7491 | } | ||
| 7492 | #[doc = "Master selection"] | ||
| 7493 | pub fn set_mstr(&mut self, val: super::vals::Mstr) { | ||
| 7494 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); | ||
| 7495 | } | ||
| 7496 | #[doc = "Baud rate control"] | ||
| 7497 | pub const fn br(&self) -> super::vals::Br { | ||
| 7498 | let val = (self.0 >> 3usize) & 0x07; | ||
| 7499 | super::vals::Br(val as u8) | ||
| 7500 | } | ||
| 7501 | #[doc = "Baud rate control"] | ||
| 7502 | pub fn set_br(&mut self, val: super::vals::Br) { | ||
| 7503 | self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize); | ||
| 7504 | } | ||
| 7505 | #[doc = "SPI enable"] | ||
| 7506 | pub const fn spe(&self) -> bool { | ||
| 7507 | let val = (self.0 >> 6usize) & 0x01; | ||
| 7508 | val != 0 | ||
| 7509 | } | ||
| 7510 | #[doc = "SPI enable"] | ||
| 7511 | pub fn set_spe(&mut self, val: bool) { | ||
| 7512 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | ||
| 7513 | } | ||
| 7514 | #[doc = "Frame format"] | ||
| 7515 | pub const fn lsbfirst(&self) -> super::vals::Lsbfirst { | ||
| 7516 | let val = (self.0 >> 7usize) & 0x01; | ||
| 7517 | super::vals::Lsbfirst(val as u8) | ||
| 7518 | } | ||
| 7519 | #[doc = "Frame format"] | ||
| 7520 | pub fn set_lsbfirst(&mut self, val: super::vals::Lsbfirst) { | ||
| 7521 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); | ||
| 7522 | } | ||
| 7523 | #[doc = "Internal slave select"] | ||
| 7524 | pub const fn ssi(&self) -> bool { | ||
| 9023 | let val = (self.0 >> 8usize) & 0x01; | 7525 | let val = (self.0 >> 8usize) & 0x01; |
| 9024 | val != 0 | 7526 | val != 0 |
| 9025 | } | 7527 | } |
| 9026 | #[doc = "Read wait start. If this bit is set, read wait operation starts."] | 7528 | #[doc = "Internal slave select"] |
| 9027 | pub fn set_rwstart(&mut self, val: bool) { | 7529 | pub fn set_ssi(&mut self, val: bool) { |
| 9028 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 7530 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 9029 | } | 7531 | } |
| 9030 | #[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."] | 7532 | #[doc = "Software slave management"] |
| 9031 | pub const fn rwstop(&self) -> bool { | 7533 | pub const fn ssm(&self) -> bool { |
| 9032 | let val = (self.0 >> 9usize) & 0x01; | 7534 | let val = (self.0 >> 9usize) & 0x01; |
| 9033 | val != 0 | 7535 | val != 0 |
| 9034 | } | 7536 | } |
| 9035 | #[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."] | 7537 | #[doc = "Software slave management"] |
| 9036 | pub fn set_rwstop(&mut self, val: bool) { | 7538 | pub fn set_ssm(&mut self, val: bool) { |
| 9037 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); | 7539 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); |
| 9038 | } | 7540 | } |
| 9039 | #[doc = "Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | 7541 | #[doc = "Receive only"] |
| 9040 | pub const fn rwmod(&self) -> bool { | 7542 | pub const fn rxonly(&self) -> super::vals::Rxonly { |
| 9041 | let val = (self.0 >> 10usize) & 0x01; | 7543 | let val = (self.0 >> 10usize) & 0x01; |
| 9042 | val != 0 | 7544 | super::vals::Rxonly(val as u8) |
| 9043 | } | 7545 | } |
| 9044 | #[doc = "Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | 7546 | #[doc = "Receive only"] |
| 9045 | pub fn set_rwmod(&mut self, val: bool) { | 7547 | pub fn set_rxonly(&mut self, val: super::vals::Rxonly) { |
| 9046 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); | 7548 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); |
| 9047 | } | 7549 | } |
| 9048 | #[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."] | 7550 | #[doc = "CRC length"] |
| 9049 | pub const fn sdioen(&self) -> bool { | 7551 | pub const fn crcl(&self) -> super::vals::Crcl { |
| 9050 | let val = (self.0 >> 11usize) & 0x01; | 7552 | let val = (self.0 >> 11usize) & 0x01; |
| 9051 | val != 0 | 7553 | super::vals::Crcl(val as u8) |
| 9052 | } | 7554 | } |
| 9053 | #[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."] | 7555 | #[doc = "CRC length"] |
| 9054 | pub fn set_sdioen(&mut self, val: bool) { | 7556 | pub fn set_crcl(&mut self, val: super::vals::Crcl) { |
| 9055 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); | 7557 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize); |
| 9056 | } | 7558 | } |
| 9057 | #[doc = "Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | 7559 | #[doc = "CRC transfer next"] |
| 9058 | pub const fn bootacken(&self) -> bool { | 7560 | pub const fn crcnext(&self) -> super::vals::Crcnext { |
| 9059 | let val = (self.0 >> 12usize) & 0x01; | 7561 | let val = (self.0 >> 12usize) & 0x01; |
| 9060 | val != 0 | 7562 | super::vals::Crcnext(val as u8) |
| 9061 | } | 7563 | } |
| 9062 | #[doc = "Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | 7564 | #[doc = "CRC transfer next"] |
| 9063 | pub fn set_bootacken(&mut self, val: bool) { | 7565 | pub fn set_crcnext(&mut self, val: super::vals::Crcnext) { |
| 9064 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); | 7566 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize); |
| 9065 | } | 7567 | } |
| 9066 | #[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."] | 7568 | #[doc = "Hardware CRC calculation enable"] |
| 9067 | pub const fn fiforst(&self) -> bool { | 7569 | pub const fn crcen(&self) -> bool { |
| 9068 | let val = (self.0 >> 13usize) & 0x01; | 7570 | let val = (self.0 >> 13usize) & 0x01; |
| 9069 | val != 0 | 7571 | val != 0 |
| 9070 | } | 7572 | } |
| 9071 | #[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."] | 7573 | #[doc = "Hardware CRC calculation enable"] |
| 9072 | pub fn set_fiforst(&mut self, val: bool) { | 7574 | pub fn set_crcen(&mut self, val: bool) { |
| 9073 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); | 7575 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); |
| 9074 | } | 7576 | } |
| 7577 | #[doc = "Output enable in bidirectional mode"] | ||
| 7578 | pub const fn bidioe(&self) -> super::vals::Bidioe { | ||
| 7579 | let val = (self.0 >> 14usize) & 0x01; | ||
| 7580 | super::vals::Bidioe(val as u8) | ||
| 7581 | } | ||
| 7582 | #[doc = "Output enable in bidirectional mode"] | ||
| 7583 | pub fn set_bidioe(&mut self, val: super::vals::Bidioe) { | ||
| 7584 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); | ||
| 7585 | } | ||
| 7586 | #[doc = "Bidirectional data mode enable"] | ||
| 7587 | pub const fn bidimode(&self) -> super::vals::Bidimode { | ||
| 7588 | let val = (self.0 >> 15usize) & 0x01; | ||
| 7589 | super::vals::Bidimode(val as u8) | ||
| 7590 | } | ||
| 7591 | #[doc = "Bidirectional data mode enable"] | ||
| 7592 | pub fn set_bidimode(&mut self, val: super::vals::Bidimode) { | ||
| 7593 | self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize); | ||
| 7594 | } | ||
| 9075 | } | 7595 | } |
| 9076 | impl Default for Dctrl { | 7596 | impl Default for Cr1 { |
| 9077 | fn default() -> Dctrl { | 7597 | fn default() -> Cr1 { |
| 9078 | Dctrl(0) | 7598 | Cr1(0) |
| 9079 | } | 7599 | } |
| 9080 | } | 7600 | } |
| 9081 | #[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."] | 7601 | #[doc = "CRC polynomial register"] |
| 9082 | #[repr(transparent)] | 7602 | #[repr(transparent)] |
| 9083 | #[derive(Copy, Clone, Eq, PartialEq)] | 7603 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 9084 | pub struct Acktimer(pub u32); | 7604 | pub struct Crcpr(pub u32); |
| 9085 | impl Acktimer { | 7605 | impl Crcpr { |
| 9086 | #[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."] | 7606 | #[doc = "CRC polynomial register"] |
| 9087 | pub const fn acktime(&self) -> u32 { | 7607 | pub const fn crcpoly(&self) -> u16 { |
| 9088 | let val = (self.0 >> 0usize) & 0x01ff_ffff; | 7608 | let val = (self.0 >> 0usize) & 0xffff; |
| 9089 | val as u32 | 7609 | val as u16 |
| 9090 | } | 7610 | } |
| 9091 | #[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."] | 7611 | #[doc = "CRC polynomial register"] |
| 9092 | pub fn set_acktime(&mut self, val: u32) { | 7612 | pub fn set_crcpoly(&mut self, val: u16) { |
| 9093 | self.0 = | 7613 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); |
| 9094 | (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize); | ||
| 9095 | } | 7614 | } |
| 9096 | } | 7615 | } |
| 9097 | impl Default for Acktimer { | 7616 | impl Default for Crcpr { |
| 9098 | fn default() -> Acktimer { | 7617 | fn default() -> Crcpr { |
| 9099 | Acktimer(0) | 7618 | Crcpr(0) |
| 7619 | } | ||
| 7620 | } | ||
| 7621 | #[doc = "RX CRC register"] | ||
| 7622 | #[repr(transparent)] | ||
| 7623 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7624 | pub struct Rxcrcr(pub u32); | ||
| 7625 | impl Rxcrcr { | ||
| 7626 | #[doc = "Rx CRC register"] | ||
| 7627 | pub const fn rx_crc(&self) -> u16 { | ||
| 7628 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 7629 | val as u16 | ||
| 7630 | } | ||
| 7631 | #[doc = "Rx CRC register"] | ||
| 7632 | pub fn set_rx_crc(&mut self, val: u16) { | ||
| 7633 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 7634 | } | ||
| 7635 | } | ||
| 7636 | impl Default for Rxcrcr { | ||
| 7637 | fn default() -> Rxcrcr { | ||
| 7638 | Rxcrcr(0) | ||
| 7639 | } | ||
| 7640 | } | ||
| 7641 | #[doc = "control register 2"] | ||
| 7642 | #[repr(transparent)] | ||
| 7643 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7644 | pub struct Cr2(pub u32); | ||
| 7645 | impl Cr2 { | ||
| 7646 | #[doc = "Rx buffer DMA enable"] | ||
| 7647 | pub const fn rxdmaen(&self) -> bool { | ||
| 7648 | let val = (self.0 >> 0usize) & 0x01; | ||
| 7649 | val != 0 | ||
| 7650 | } | ||
| 7651 | #[doc = "Rx buffer DMA enable"] | ||
| 7652 | pub fn set_rxdmaen(&mut self, val: bool) { | ||
| 7653 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 7654 | } | ||
| 7655 | #[doc = "Tx buffer DMA enable"] | ||
| 7656 | pub const fn txdmaen(&self) -> bool { | ||
| 7657 | let val = (self.0 >> 1usize) & 0x01; | ||
| 7658 | val != 0 | ||
| 7659 | } | ||
| 7660 | #[doc = "Tx buffer DMA enable"] | ||
| 7661 | pub fn set_txdmaen(&mut self, val: bool) { | ||
| 7662 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 7663 | } | ||
| 7664 | #[doc = "SS output enable"] | ||
| 7665 | pub const fn ssoe(&self) -> bool { | ||
| 7666 | let val = (self.0 >> 2usize) & 0x01; | ||
| 7667 | val != 0 | ||
| 7668 | } | ||
| 7669 | #[doc = "SS output enable"] | ||
| 7670 | pub fn set_ssoe(&mut self, val: bool) { | ||
| 7671 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | ||
| 7672 | } | ||
| 7673 | #[doc = "NSS pulse management"] | ||
| 7674 | pub const fn nssp(&self) -> bool { | ||
| 7675 | let val = (self.0 >> 3usize) & 0x01; | ||
| 7676 | val != 0 | ||
| 7677 | } | ||
| 7678 | #[doc = "NSS pulse management"] | ||
| 7679 | pub fn set_nssp(&mut self, val: bool) { | ||
| 7680 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | ||
| 7681 | } | ||
| 7682 | #[doc = "Frame format"] | ||
| 7683 | pub const fn frf(&self) -> super::vals::Frf { | ||
| 7684 | let val = (self.0 >> 4usize) & 0x01; | ||
| 7685 | super::vals::Frf(val as u8) | ||
| 7686 | } | ||
| 7687 | #[doc = "Frame format"] | ||
| 7688 | pub fn set_frf(&mut self, val: super::vals::Frf) { | ||
| 7689 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize); | ||
| 7690 | } | ||
| 7691 | #[doc = "Error interrupt enable"] | ||
| 7692 | pub const fn errie(&self) -> bool { | ||
| 7693 | let val = (self.0 >> 5usize) & 0x01; | ||
| 7694 | val != 0 | ||
| 7695 | } | ||
| 7696 | #[doc = "Error interrupt enable"] | ||
| 7697 | pub fn set_errie(&mut self, val: bool) { | ||
| 7698 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | ||
| 7699 | } | ||
| 7700 | #[doc = "RX buffer not empty interrupt enable"] | ||
| 7701 | pub const fn rxneie(&self) -> bool { | ||
| 7702 | let val = (self.0 >> 6usize) & 0x01; | ||
| 7703 | val != 0 | ||
| 7704 | } | ||
| 7705 | #[doc = "RX buffer not empty interrupt enable"] | ||
| 7706 | pub fn set_rxneie(&mut self, val: bool) { | ||
| 7707 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | ||
| 7708 | } | ||
| 7709 | #[doc = "Tx buffer empty interrupt enable"] | ||
| 7710 | pub const fn txeie(&self) -> bool { | ||
| 7711 | let val = (self.0 >> 7usize) & 0x01; | ||
| 7712 | val != 0 | ||
| 7713 | } | ||
| 7714 | #[doc = "Tx buffer empty interrupt enable"] | ||
| 7715 | pub fn set_txeie(&mut self, val: bool) { | ||
| 7716 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 7717 | } | ||
| 7718 | #[doc = "Data size"] | ||
| 7719 | pub const fn ds(&self) -> super::vals::Ds { | ||
| 7720 | let val = (self.0 >> 8usize) & 0x0f; | ||
| 7721 | super::vals::Ds(val as u8) | ||
| 7722 | } | ||
| 7723 | #[doc = "Data size"] | ||
| 7724 | pub fn set_ds(&mut self, val: super::vals::Ds) { | ||
| 7725 | self.0 = (self.0 & !(0x0f << 8usize)) | (((val.0 as u32) & 0x0f) << 8usize); | ||
| 7726 | } | ||
| 7727 | #[doc = "FIFO reception threshold"] | ||
| 7728 | pub const fn frxth(&self) -> super::vals::Frxth { | ||
| 7729 | let val = (self.0 >> 12usize) & 0x01; | ||
| 7730 | super::vals::Frxth(val as u8) | ||
| 7731 | } | ||
| 7732 | #[doc = "FIFO reception threshold"] | ||
| 7733 | pub fn set_frxth(&mut self, val: super::vals::Frxth) { | ||
| 7734 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize); | ||
| 7735 | } | ||
| 7736 | #[doc = "Last DMA transfer for reception"] | ||
| 7737 | pub const fn ldma_rx(&self) -> super::vals::LdmaRx { | ||
| 7738 | let val = (self.0 >> 13usize) & 0x01; | ||
| 7739 | super::vals::LdmaRx(val as u8) | ||
| 7740 | } | ||
| 7741 | #[doc = "Last DMA transfer for reception"] | ||
| 7742 | pub fn set_ldma_rx(&mut self, val: super::vals::LdmaRx) { | ||
| 7743 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val.0 as u32) & 0x01) << 13usize); | ||
| 7744 | } | ||
| 7745 | #[doc = "Last DMA transfer for transmission"] | ||
| 7746 | pub const fn ldma_tx(&self) -> super::vals::LdmaTx { | ||
| 7747 | let val = (self.0 >> 14usize) & 0x01; | ||
| 7748 | super::vals::LdmaTx(val as u8) | ||
| 7749 | } | ||
| 7750 | #[doc = "Last DMA transfer for transmission"] | ||
| 7751 | pub fn set_ldma_tx(&mut self, val: super::vals::LdmaTx) { | ||
| 7752 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); | ||
| 7753 | } | ||
| 7754 | } | ||
| 7755 | impl Default for Cr2 { | ||
| 7756 | fn default() -> Cr2 { | ||
| 7757 | Cr2(0) | ||
| 7758 | } | ||
| 7759 | } | ||
| 7760 | #[doc = "data register"] | ||
| 7761 | #[repr(transparent)] | ||
| 7762 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7763 | pub struct Dr(pub u32); | ||
| 7764 | impl Dr { | ||
| 7765 | #[doc = "Data register"] | ||
| 7766 | pub const fn dr(&self) -> u16 { | ||
| 7767 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 7768 | val as u16 | ||
| 7769 | } | ||
| 7770 | #[doc = "Data register"] | ||
| 7771 | pub fn set_dr(&mut self, val: u16) { | ||
| 7772 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 7773 | } | ||
| 7774 | } | ||
| 7775 | impl Default for Dr { | ||
| 7776 | fn default() -> Dr { | ||
| 7777 | Dr(0) | ||
| 7778 | } | ||
| 7779 | } | ||
| 7780 | #[doc = "status register"] | ||
| 7781 | #[repr(transparent)] | ||
| 7782 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7783 | pub struct Sr(pub u32); | ||
| 7784 | impl Sr { | ||
| 7785 | #[doc = "Receive buffer not empty"] | ||
| 7786 | pub const fn rxne(&self) -> bool { | ||
| 7787 | let val = (self.0 >> 0usize) & 0x01; | ||
| 7788 | val != 0 | ||
| 7789 | } | ||
| 7790 | #[doc = "Receive buffer not empty"] | ||
| 7791 | pub fn set_rxne(&mut self, val: bool) { | ||
| 7792 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 7793 | } | ||
| 7794 | #[doc = "Transmit buffer empty"] | ||
| 7795 | pub const fn txe(&self) -> bool { | ||
| 7796 | let val = (self.0 >> 1usize) & 0x01; | ||
| 7797 | val != 0 | ||
| 7798 | } | ||
| 7799 | #[doc = "Transmit buffer empty"] | ||
| 7800 | pub fn set_txe(&mut self, val: bool) { | ||
| 7801 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 7802 | } | ||
| 7803 | #[doc = "CRC error flag"] | ||
| 7804 | pub const fn crcerr(&self) -> bool { | ||
| 7805 | let val = (self.0 >> 4usize) & 0x01; | ||
| 7806 | val != 0 | ||
| 7807 | } | ||
| 7808 | #[doc = "CRC error flag"] | ||
| 7809 | pub fn set_crcerr(&mut self, val: bool) { | ||
| 7810 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | ||
| 7811 | } | ||
| 7812 | #[doc = "Mode fault"] | ||
| 7813 | pub const fn modf(&self) -> bool { | ||
| 7814 | let val = (self.0 >> 5usize) & 0x01; | ||
| 7815 | val != 0 | ||
| 7816 | } | ||
| 7817 | #[doc = "Mode fault"] | ||
| 7818 | pub fn set_modf(&mut self, val: bool) { | ||
| 7819 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | ||
| 7820 | } | ||
| 7821 | #[doc = "Overrun flag"] | ||
| 7822 | pub const fn ovr(&self) -> bool { | ||
| 7823 | let val = (self.0 >> 6usize) & 0x01; | ||
| 7824 | val != 0 | ||
| 7825 | } | ||
| 7826 | #[doc = "Overrun flag"] | ||
| 7827 | pub fn set_ovr(&mut self, val: bool) { | ||
| 7828 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | ||
| 7829 | } | ||
| 7830 | #[doc = "Busy flag"] | ||
| 7831 | pub const fn bsy(&self) -> bool { | ||
| 7832 | let val = (self.0 >> 7usize) & 0x01; | ||
| 7833 | val != 0 | ||
| 7834 | } | ||
| 7835 | #[doc = "Busy flag"] | ||
| 7836 | pub fn set_bsy(&mut self, val: bool) { | ||
| 7837 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 7838 | } | ||
| 7839 | #[doc = "Frame format error"] | ||
| 7840 | pub const fn fre(&self) -> bool { | ||
| 7841 | let val = (self.0 >> 8usize) & 0x01; | ||
| 7842 | val != 0 | ||
| 7843 | } | ||
| 7844 | #[doc = "Frame format error"] | ||
| 7845 | pub fn set_fre(&mut self, val: bool) { | ||
| 7846 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | ||
| 7847 | } | ||
| 7848 | #[doc = "FIFO reception level"] | ||
| 7849 | pub const fn frlvl(&self) -> u8 { | ||
| 7850 | let val = (self.0 >> 9usize) & 0x03; | ||
| 7851 | val as u8 | ||
| 7852 | } | ||
| 7853 | #[doc = "FIFO reception level"] | ||
| 7854 | pub fn set_frlvl(&mut self, val: u8) { | ||
| 7855 | self.0 = (self.0 & !(0x03 << 9usize)) | (((val as u32) & 0x03) << 9usize); | ||
| 7856 | } | ||
| 7857 | #[doc = "FIFO Transmission Level"] | ||
| 7858 | pub const fn ftlvl(&self) -> u8 { | ||
| 7859 | let val = (self.0 >> 11usize) & 0x03; | ||
| 7860 | val as u8 | ||
| 7861 | } | ||
| 7862 | #[doc = "FIFO Transmission Level"] | ||
| 7863 | pub fn set_ftlvl(&mut self, val: u8) { | ||
| 7864 | self.0 = (self.0 & !(0x03 << 11usize)) | (((val as u32) & 0x03) << 11usize); | ||
| 7865 | } | ||
| 7866 | } | ||
| 7867 | impl Default for Sr { | ||
| 7868 | fn default() -> Sr { | ||
| 7869 | Sr(0) | ||
| 7870 | } | ||
| 7871 | } | ||
| 7872 | #[doc = "TX CRC register"] | ||
| 7873 | #[repr(transparent)] | ||
| 7874 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7875 | pub struct Txcrcr(pub u32); | ||
| 7876 | impl Txcrcr { | ||
| 7877 | #[doc = "Tx CRC register"] | ||
| 7878 | pub const fn tx_crc(&self) -> u16 { | ||
| 7879 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 7880 | val as u16 | ||
| 7881 | } | ||
| 7882 | #[doc = "Tx CRC register"] | ||
| 7883 | pub fn set_tx_crc(&mut self, val: u16) { | ||
| 7884 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 7885 | } | ||
| 7886 | } | ||
| 7887 | impl Default for Txcrcr { | ||
| 7888 | fn default() -> Txcrcr { | ||
| 7889 | Txcrcr(0) | ||
| 7890 | } | ||
| 7891 | } | ||
| 7892 | } | ||
| 7893 | pub mod vals { | ||
| 7894 | use crate::generic::*; | ||
| 7895 | #[repr(transparent)] | ||
| 7896 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7897 | pub struct Cpha(pub u8); | ||
| 7898 | impl Cpha { | ||
| 7899 | #[doc = "The first clock transition is the first data capture edge"] | ||
| 7900 | pub const FIRSTEDGE: Self = Self(0); | ||
| 7901 | #[doc = "The second clock transition is the first data capture edge"] | ||
| 7902 | pub const SECONDEDGE: Self = Self(0x01); | ||
| 7903 | } | ||
| 7904 | #[repr(transparent)] | ||
| 7905 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7906 | pub struct Crcl(pub u8); | ||
| 7907 | impl Crcl { | ||
| 7908 | #[doc = "8-bit CRC length"] | ||
| 7909 | pub const EIGHTBIT: Self = Self(0); | ||
| 7910 | #[doc = "16-bit CRC length"] | ||
| 7911 | pub const SIXTEENBIT: Self = Self(0x01); | ||
| 7912 | } | ||
| 7913 | #[repr(transparent)] | ||
| 7914 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7915 | pub struct Br(pub u8); | ||
| 7916 | impl Br { | ||
| 7917 | #[doc = "f_PCLK / 2"] | ||
| 7918 | pub const DIV2: Self = Self(0); | ||
| 7919 | #[doc = "f_PCLK / 4"] | ||
| 7920 | pub const DIV4: Self = Self(0x01); | ||
| 7921 | #[doc = "f_PCLK / 8"] | ||
| 7922 | pub const DIV8: Self = Self(0x02); | ||
| 7923 | #[doc = "f_PCLK / 16"] | ||
| 7924 | pub const DIV16: Self = Self(0x03); | ||
| 7925 | #[doc = "f_PCLK / 32"] | ||
| 7926 | pub const DIV32: Self = Self(0x04); | ||
| 7927 | #[doc = "f_PCLK / 64"] | ||
| 7928 | pub const DIV64: Self = Self(0x05); | ||
| 7929 | #[doc = "f_PCLK / 128"] | ||
| 7930 | pub const DIV128: Self = Self(0x06); | ||
| 7931 | #[doc = "f_PCLK / 256"] | ||
| 7932 | pub const DIV256: Self = Self(0x07); | ||
| 7933 | } | ||
| 7934 | #[repr(transparent)] | ||
| 7935 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7936 | pub struct Crcnext(pub u8); | ||
| 7937 | impl Crcnext { | ||
| 7938 | #[doc = "Next transmit value is from Tx buffer"] | ||
| 7939 | pub const TXBUFFER: Self = Self(0); | ||
| 7940 | #[doc = "Next transmit value is from Tx CRC register"] | ||
| 7941 | pub const CRC: Self = Self(0x01); | ||
| 7942 | } | ||
| 7943 | #[repr(transparent)] | ||
| 7944 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7945 | pub struct Ftlvlr(pub u8); | ||
| 7946 | impl Ftlvlr { | ||
| 7947 | #[doc = "Tx FIFO Empty"] | ||
| 7948 | pub const EMPTY: Self = Self(0); | ||
| 7949 | #[doc = "Tx 1/4 FIFO"] | ||
| 7950 | pub const QUARTER: Self = Self(0x01); | ||
| 7951 | #[doc = "Tx 1/2 FIFO"] | ||
| 7952 | pub const HALF: Self = Self(0x02); | ||
| 7953 | #[doc = "Tx FIFO full"] | ||
| 7954 | pub const FULL: Self = Self(0x03); | ||
| 7955 | } | ||
| 7956 | #[repr(transparent)] | ||
| 7957 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7958 | pub struct LdmaRx(pub u8); | ||
| 7959 | impl LdmaRx { | ||
| 7960 | #[doc = "Number of data to transfer for receive is even"] | ||
| 7961 | pub const EVEN: Self = Self(0); | ||
| 7962 | #[doc = "Number of data to transfer for receive is odd"] | ||
| 7963 | pub const ODD: Self = Self(0x01); | ||
| 7964 | } | ||
| 7965 | #[repr(transparent)] | ||
| 7966 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7967 | pub struct Frxth(pub u8); | ||
| 7968 | impl Frxth { | ||
| 7969 | #[doc = "RXNE event is generated if the FIFO level is greater than or equal to 1/2 (16-bit)"] | ||
| 7970 | pub const HALF: Self = Self(0); | ||
| 7971 | #[doc = "RXNE event is generated if the FIFO level is greater than or equal to 1/4 (8-bit)"] | ||
| 7972 | pub const QUARTER: Self = Self(0x01); | ||
| 7973 | } | ||
| 7974 | #[repr(transparent)] | ||
| 7975 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7976 | pub struct Bidioe(pub u8); | ||
| 7977 | impl Bidioe { | ||
| 7978 | #[doc = "Output disabled (receive-only mode)"] | ||
| 7979 | pub const OUTPUTDISABLED: Self = Self(0); | ||
| 7980 | #[doc = "Output enabled (transmit-only mode)"] | ||
| 7981 | pub const OUTPUTENABLED: Self = Self(0x01); | ||
| 7982 | } | ||
| 7983 | #[repr(transparent)] | ||
| 7984 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7985 | pub struct Lsbfirst(pub u8); | ||
| 7986 | impl Lsbfirst { | ||
| 7987 | #[doc = "Data is transmitted/received with the MSB first"] | ||
| 7988 | pub const MSBFIRST: Self = Self(0); | ||
| 7989 | #[doc = "Data is transmitted/received with the LSB first"] | ||
| 7990 | pub const LSBFIRST: Self = Self(0x01); | ||
| 7991 | } | ||
| 7992 | #[repr(transparent)] | ||
| 7993 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7994 | pub struct Cpol(pub u8); | ||
| 7995 | impl Cpol { | ||
| 7996 | #[doc = "CK to 0 when idle"] | ||
| 7997 | pub const IDLELOW: Self = Self(0); | ||
| 7998 | #[doc = "CK to 1 when idle"] | ||
| 7999 | pub const IDLEHIGH: Self = Self(0x01); | ||
| 8000 | } | ||
| 8001 | #[repr(transparent)] | ||
| 8002 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8003 | pub struct Frer(pub u8); | ||
| 8004 | impl Frer { | ||
| 8005 | #[doc = "No frame format error"] | ||
| 8006 | pub const NOERROR: Self = Self(0); | ||
| 8007 | #[doc = "A frame format error occurred"] | ||
| 8008 | pub const ERROR: Self = Self(0x01); | ||
| 8009 | } | ||
| 8010 | #[repr(transparent)] | ||
| 8011 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8012 | pub struct Ds(pub u8); | ||
| 8013 | impl Ds { | ||
| 8014 | #[doc = "4-bit"] | ||
| 8015 | pub const FOURBIT: Self = Self(0x03); | ||
| 8016 | #[doc = "5-bit"] | ||
| 8017 | pub const FIVEBIT: Self = Self(0x04); | ||
| 8018 | #[doc = "6-bit"] | ||
| 8019 | pub const SIXBIT: Self = Self(0x05); | ||
| 8020 | #[doc = "7-bit"] | ||
| 8021 | pub const SEVENBIT: Self = Self(0x06); | ||
| 8022 | #[doc = "8-bit"] | ||
| 8023 | pub const EIGHTBIT: Self = Self(0x07); | ||
| 8024 | #[doc = "9-bit"] | ||
| 8025 | pub const NINEBIT: Self = Self(0x08); | ||
| 8026 | #[doc = "10-bit"] | ||
| 8027 | pub const TENBIT: Self = Self(0x09); | ||
| 8028 | #[doc = "11-bit"] | ||
| 8029 | pub const ELEVENBIT: Self = Self(0x0a); | ||
| 8030 | #[doc = "12-bit"] | ||
| 8031 | pub const TWELVEBIT: Self = Self(0x0b); | ||
| 8032 | #[doc = "13-bit"] | ||
| 8033 | pub const THIRTEENBIT: Self = Self(0x0c); | ||
| 8034 | #[doc = "14-bit"] | ||
| 8035 | pub const FOURTEENBIT: Self = Self(0x0d); | ||
| 8036 | #[doc = "15-bit"] | ||
| 8037 | pub const FIFTEENBIT: Self = Self(0x0e); | ||
| 8038 | #[doc = "16-bit"] | ||
| 8039 | pub const SIXTEENBIT: Self = Self(0x0f); | ||
| 8040 | } | ||
| 8041 | #[repr(transparent)] | ||
| 8042 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8043 | pub struct Bidimode(pub u8); | ||
| 8044 | impl Bidimode { | ||
| 8045 | #[doc = "2-line unidirectional data mode selected"] | ||
| 8046 | pub const UNIDIRECTIONAL: Self = Self(0); | ||
| 8047 | #[doc = "1-line bidirectional data mode selected"] | ||
| 8048 | pub const BIDIRECTIONAL: Self = Self(0x01); | ||
| 8049 | } | ||
| 8050 | #[repr(transparent)] | ||
| 8051 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8052 | pub struct LdmaTx(pub u8); | ||
| 8053 | impl LdmaTx { | ||
| 8054 | #[doc = "Number of data to transfer for transmit is even"] | ||
| 8055 | pub const EVEN: Self = Self(0); | ||
| 8056 | #[doc = "Number of data to transfer for transmit is odd"] | ||
| 8057 | pub const ODD: Self = Self(0x01); | ||
| 8058 | } | ||
| 8059 | #[repr(transparent)] | ||
| 8060 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8061 | pub struct Mstr(pub u8); | ||
| 8062 | impl Mstr { | ||
| 8063 | #[doc = "Slave configuration"] | ||
| 8064 | pub const SLAVE: Self = Self(0); | ||
| 8065 | #[doc = "Master configuration"] | ||
| 8066 | pub const MASTER: Self = Self(0x01); | ||
| 8067 | } | ||
| 8068 | #[repr(transparent)] | ||
| 8069 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8070 | pub struct Rxonly(pub u8); | ||
| 8071 | impl Rxonly { | ||
| 8072 | #[doc = "Full duplex (Transmit and receive)"] | ||
| 8073 | pub const FULLDUPLEX: Self = Self(0); | ||
| 8074 | #[doc = "Output disabled (Receive-only mode)"] | ||
| 8075 | pub const OUTPUTDISABLED: Self = Self(0x01); | ||
| 8076 | } | ||
| 8077 | #[repr(transparent)] | ||
| 8078 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8079 | pub struct Frlvlr(pub u8); | ||
| 8080 | impl Frlvlr { | ||
| 8081 | #[doc = "Rx FIFO Empty"] | ||
| 8082 | pub const EMPTY: Self = Self(0); | ||
| 8083 | #[doc = "Rx 1/4 FIFO"] | ||
| 8084 | pub const QUARTER: Self = Self(0x01); | ||
| 8085 | #[doc = "Rx 1/2 FIFO"] | ||
| 8086 | pub const HALF: Self = Self(0x02); | ||
| 8087 | #[doc = "Rx FIFO full"] | ||
| 8088 | pub const FULL: Self = Self(0x03); | ||
| 8089 | } | ||
| 8090 | #[repr(transparent)] | ||
| 8091 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8092 | pub struct Frf(pub u8); | ||
| 8093 | impl Frf { | ||
| 8094 | #[doc = "SPI Motorola mode"] | ||
| 8095 | pub const MOTOROLA: Self = Self(0); | ||
| 8096 | #[doc = "SPI TI mode"] | ||
| 8097 | pub const TI: Self = Self(0x01); | ||
| 8098 | } | ||
| 8099 | } | ||
| 8100 | } | ||
| 8101 | pub mod syscfg_f4 { | ||
| 8102 | use crate::generic::*; | ||
| 8103 | #[doc = "System configuration controller"] | ||
| 8104 | #[derive(Copy, Clone)] | ||
| 8105 | pub struct Syscfg(pub *mut u8); | ||
| 8106 | unsafe impl Send for Syscfg {} | ||
| 8107 | unsafe impl Sync for Syscfg {} | ||
| 8108 | impl Syscfg { | ||
| 8109 | #[doc = "memory remap register"] | ||
| 8110 | pub fn memrm(self) -> Reg<regs::Memrm, RW> { | ||
| 8111 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 8112 | } | ||
| 8113 | #[doc = "peripheral mode configuration register"] | ||
| 8114 | pub fn pmc(self) -> Reg<regs::Pmc, RW> { | ||
| 8115 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 8116 | } | ||
| 8117 | #[doc = "external interrupt configuration register"] | ||
| 8118 | pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> { | ||
| 8119 | assert!(n < 4usize); | ||
| 8120 | unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) } | ||
| 8121 | } | ||
| 8122 | #[doc = "Compensation cell control register"] | ||
| 8123 | pub fn cmpcr(self) -> Reg<regs::Cmpcr, R> { | ||
| 8124 | unsafe { Reg::from_ptr(self.0.add(32usize)) } | ||
| 8125 | } | ||
| 8126 | } | ||
| 8127 | pub mod regs { | ||
| 8128 | use crate::generic::*; | ||
| 8129 | #[doc = "Compensation cell control register"] | ||
| 8130 | #[repr(transparent)] | ||
| 8131 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8132 | pub struct Cmpcr(pub u32); | ||
| 8133 | impl Cmpcr { | ||
| 8134 | #[doc = "Compensation cell power-down"] | ||
| 8135 | pub const fn cmp_pd(&self) -> bool { | ||
| 8136 | let val = (self.0 >> 0usize) & 0x01; | ||
| 8137 | val != 0 | ||
| 8138 | } | ||
| 8139 | #[doc = "Compensation cell power-down"] | ||
| 8140 | pub fn set_cmp_pd(&mut self, val: bool) { | ||
| 8141 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 8142 | } | ||
| 8143 | #[doc = "READY"] | ||
| 8144 | pub const fn ready(&self) -> bool { | ||
| 8145 | let val = (self.0 >> 8usize) & 0x01; | ||
| 8146 | val != 0 | ||
| 8147 | } | ||
| 8148 | #[doc = "READY"] | ||
| 8149 | pub fn set_ready(&mut self, val: bool) { | ||
| 8150 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | ||
| 8151 | } | ||
| 8152 | } | ||
| 8153 | impl Default for Cmpcr { | ||
| 8154 | fn default() -> Cmpcr { | ||
| 8155 | Cmpcr(0) | ||
| 8156 | } | ||
| 8157 | } | ||
| 8158 | #[doc = "peripheral mode configuration register"] | ||
| 8159 | #[repr(transparent)] | ||
| 8160 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8161 | pub struct Pmc(pub u32); | ||
| 8162 | impl Pmc { | ||
| 8163 | #[doc = "ADC1DC2"] | ||
| 8164 | pub const fn adc1dc2(&self) -> bool { | ||
| 8165 | let val = (self.0 >> 16usize) & 0x01; | ||
| 8166 | val != 0 | ||
| 8167 | } | ||
| 8168 | #[doc = "ADC1DC2"] | ||
| 8169 | pub fn set_adc1dc2(&mut self, val: bool) { | ||
| 8170 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | ||
| 8171 | } | ||
| 8172 | #[doc = "ADC2DC2"] | ||
| 8173 | pub const fn adc2dc2(&self) -> bool { | ||
| 8174 | let val = (self.0 >> 17usize) & 0x01; | ||
| 8175 | val != 0 | ||
| 8176 | } | ||
| 8177 | #[doc = "ADC2DC2"] | ||
| 8178 | pub fn set_adc2dc2(&mut self, val: bool) { | ||
| 8179 | self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); | ||
| 8180 | } | ||
| 8181 | #[doc = "ADC3DC2"] | ||
| 8182 | pub const fn adc3dc2(&self) -> bool { | ||
| 8183 | let val = (self.0 >> 18usize) & 0x01; | ||
| 8184 | val != 0 | ||
| 8185 | } | ||
| 8186 | #[doc = "ADC3DC2"] | ||
| 8187 | pub fn set_adc3dc2(&mut self, val: bool) { | ||
| 8188 | self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); | ||
| 8189 | } | ||
| 8190 | #[doc = "Ethernet PHY interface selection"] | ||
| 8191 | pub const fn mii_rmii_sel(&self) -> bool { | ||
| 8192 | let val = (self.0 >> 23usize) & 0x01; | ||
| 8193 | val != 0 | ||
| 8194 | } | ||
| 8195 | #[doc = "Ethernet PHY interface selection"] | ||
| 8196 | pub fn set_mii_rmii_sel(&mut self, val: bool) { | ||
| 8197 | self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); | ||
| 8198 | } | ||
| 8199 | } | ||
| 8200 | impl Default for Pmc { | ||
| 8201 | fn default() -> Pmc { | ||
| 8202 | Pmc(0) | ||
| 8203 | } | ||
| 8204 | } | ||
| 8205 | #[doc = "memory remap register"] | ||
| 8206 | #[repr(transparent)] | ||
| 8207 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8208 | pub struct Memrm(pub u32); | ||
| 8209 | impl Memrm { | ||
| 8210 | #[doc = "Memory mapping selection"] | ||
| 8211 | pub const fn mem_mode(&self) -> u8 { | ||
| 8212 | let val = (self.0 >> 0usize) & 0x07; | ||
| 8213 | val as u8 | ||
| 8214 | } | ||
| 8215 | #[doc = "Memory mapping selection"] | ||
| 8216 | pub fn set_mem_mode(&mut self, val: u8) { | ||
| 8217 | self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); | ||
| 8218 | } | ||
| 8219 | #[doc = "Flash bank mode selection"] | ||
| 8220 | pub const fn fb_mode(&self) -> bool { | ||
| 8221 | let val = (self.0 >> 8usize) & 0x01; | ||
| 8222 | val != 0 | ||
| 8223 | } | ||
| 8224 | #[doc = "Flash bank mode selection"] | ||
| 8225 | pub fn set_fb_mode(&mut self, val: bool) { | ||
| 8226 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | ||
| 8227 | } | ||
| 8228 | #[doc = "FMC memory mapping swap"] | ||
| 8229 | pub const fn swp_fmc(&self) -> u8 { | ||
| 8230 | let val = (self.0 >> 10usize) & 0x03; | ||
| 8231 | val as u8 | ||
| 8232 | } | ||
| 8233 | #[doc = "FMC memory mapping swap"] | ||
| 8234 | pub fn set_swp_fmc(&mut self, val: u8) { | ||
| 8235 | self.0 = (self.0 & !(0x03 << 10usize)) | (((val as u32) & 0x03) << 10usize); | ||
| 8236 | } | ||
| 8237 | } | ||
| 8238 | impl Default for Memrm { | ||
| 8239 | fn default() -> Memrm { | ||
| 8240 | Memrm(0) | ||
| 8241 | } | ||
| 8242 | } | ||
| 8243 | #[doc = "external interrupt configuration register"] | ||
| 8244 | #[repr(transparent)] | ||
| 8245 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8246 | pub struct Exticr(pub u32); | ||
| 8247 | impl Exticr { | ||
| 8248 | #[doc = "EXTI x configuration"] | ||
| 8249 | pub fn exti(&self, n: usize) -> u8 { | ||
| 8250 | assert!(n < 4usize); | ||
| 8251 | let offs = 0usize + n * 4usize; | ||
| 8252 | let val = (self.0 >> offs) & 0x0f; | ||
| 8253 | val as u8 | ||
| 8254 | } | ||
| 8255 | #[doc = "EXTI x configuration"] | ||
| 8256 | pub fn set_exti(&mut self, n: usize, val: u8) { | ||
| 8257 | assert!(n < 4usize); | ||
| 8258 | let offs = 0usize + n * 4usize; | ||
| 8259 | self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs); | ||
| 8260 | } | ||
| 8261 | } | ||
| 8262 | impl Default for Exticr { | ||
| 8263 | fn default() -> Exticr { | ||
| 8264 | Exticr(0) | ||
| 8265 | } | ||
| 8266 | } | ||
| 8267 | } | ||
| 8268 | } | ||
| 8269 | pub mod gpio_v2 { | ||
| 8270 | use crate::generic::*; | ||
| 8271 | #[doc = "General-purpose I/Os"] | ||
| 8272 | #[derive(Copy, Clone)] | ||
| 8273 | pub struct Gpio(pub *mut u8); | ||
| 8274 | unsafe impl Send for Gpio {} | ||
| 8275 | unsafe impl Sync for Gpio {} | ||
| 8276 | impl Gpio { | ||
| 8277 | #[doc = "GPIO port mode register"] | ||
| 8278 | pub fn moder(self) -> Reg<regs::Moder, RW> { | ||
| 8279 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 8280 | } | ||
| 8281 | #[doc = "GPIO port output type register"] | ||
| 8282 | pub fn otyper(self) -> Reg<regs::Otyper, RW> { | ||
| 8283 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 8284 | } | ||
| 8285 | #[doc = "GPIO port output speed register"] | ||
| 8286 | pub fn ospeedr(self) -> Reg<regs::Ospeedr, RW> { | ||
| 8287 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 8288 | } | ||
| 8289 | #[doc = "GPIO port pull-up/pull-down register"] | ||
| 8290 | pub fn pupdr(self) -> Reg<regs::Pupdr, RW> { | ||
| 8291 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 8292 | } | ||
| 8293 | #[doc = "GPIO port input data register"] | ||
| 8294 | pub fn idr(self) -> Reg<regs::Idr, R> { | ||
| 8295 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 8296 | } | ||
| 8297 | #[doc = "GPIO port output data register"] | ||
| 8298 | pub fn odr(self) -> Reg<regs::Odr, RW> { | ||
| 8299 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | ||
| 8300 | } | ||
| 8301 | #[doc = "GPIO port bit set/reset register"] | ||
| 8302 | pub fn bsrr(self) -> Reg<regs::Bsrr, W> { | ||
| 8303 | unsafe { Reg::from_ptr(self.0.add(24usize)) } | ||
| 8304 | } | ||
| 8305 | #[doc = "GPIO port configuration lock register"] | ||
| 8306 | pub fn lckr(self) -> Reg<regs::Lckr, RW> { | ||
| 8307 | unsafe { Reg::from_ptr(self.0.add(28usize)) } | ||
| 8308 | } | ||
| 8309 | #[doc = "GPIO alternate function register (low, high)"] | ||
| 8310 | pub fn afr(self, n: usize) -> Reg<regs::Afr, RW> { | ||
| 8311 | assert!(n < 2usize); | ||
| 8312 | unsafe { Reg::from_ptr(self.0.add(32usize + n * 4usize)) } | ||
| 8313 | } | ||
| 8314 | } | ||
| 8315 | pub mod regs { | ||
| 8316 | use crate::generic::*; | ||
| 8317 | #[doc = "GPIO port bit set/reset register"] | ||
| 8318 | #[repr(transparent)] | ||
| 8319 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8320 | pub struct Bsrr(pub u32); | ||
| 8321 | impl Bsrr { | ||
| 8322 | #[doc = "Port x set bit y (y= 0..15)"] | ||
| 8323 | pub fn bs(&self, n: usize) -> bool { | ||
| 8324 | assert!(n < 16usize); | ||
| 8325 | let offs = 0usize + n * 1usize; | ||
| 8326 | let val = (self.0 >> offs) & 0x01; | ||
| 8327 | val != 0 | ||
| 8328 | } | ||
| 8329 | #[doc = "Port x set bit y (y= 0..15)"] | ||
| 8330 | pub fn set_bs(&mut self, n: usize, val: bool) { | ||
| 8331 | assert!(n < 16usize); | ||
| 8332 | let offs = 0usize + n * 1usize; | ||
| 8333 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 8334 | } | ||
| 8335 | #[doc = "Port x set bit y (y= 0..15)"] | ||
| 8336 | pub fn br(&self, n: usize) -> bool { | ||
| 8337 | assert!(n < 16usize); | ||
| 8338 | let offs = 16usize + n * 1usize; | ||
| 8339 | let val = (self.0 >> offs) & 0x01; | ||
| 8340 | val != 0 | ||
| 8341 | } | ||
| 8342 | #[doc = "Port x set bit y (y= 0..15)"] | ||
| 8343 | pub fn set_br(&mut self, n: usize, val: bool) { | ||
| 8344 | assert!(n < 16usize); | ||
| 8345 | let offs = 16usize + n * 1usize; | ||
| 8346 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 8347 | } | ||
| 8348 | } | ||
| 8349 | impl Default for Bsrr { | ||
| 8350 | fn default() -> Bsrr { | ||
| 8351 | Bsrr(0) | ||
| 8352 | } | ||
| 8353 | } | ||
| 8354 | #[doc = "GPIO port output speed register"] | ||
| 8355 | #[repr(transparent)] | ||
| 8356 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8357 | pub struct Ospeedr(pub u32); | ||
| 8358 | impl Ospeedr { | ||
| 8359 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 8360 | pub fn ospeedr(&self, n: usize) -> super::vals::Ospeedr { | ||
| 8361 | assert!(n < 16usize); | ||
| 8362 | let offs = 0usize + n * 2usize; | ||
| 8363 | let val = (self.0 >> offs) & 0x03; | ||
| 8364 | super::vals::Ospeedr(val as u8) | ||
| 8365 | } | ||
| 8366 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 8367 | pub fn set_ospeedr(&mut self, n: usize, val: super::vals::Ospeedr) { | ||
| 8368 | assert!(n < 16usize); | ||
| 8369 | let offs = 0usize + n * 2usize; | ||
| 8370 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 8371 | } | ||
| 8372 | } | ||
| 8373 | impl Default for Ospeedr { | ||
| 8374 | fn default() -> Ospeedr { | ||
| 8375 | Ospeedr(0) | ||
| 8376 | } | ||
| 8377 | } | ||
| 8378 | #[doc = "GPIO port mode register"] | ||
| 8379 | #[repr(transparent)] | ||
| 8380 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8381 | pub struct Moder(pub u32); | ||
| 8382 | impl Moder { | ||
| 8383 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 8384 | pub fn moder(&self, n: usize) -> super::vals::Moder { | ||
| 8385 | assert!(n < 16usize); | ||
| 8386 | let offs = 0usize + n * 2usize; | ||
| 8387 | let val = (self.0 >> offs) & 0x03; | ||
| 8388 | super::vals::Moder(val as u8) | ||
| 8389 | } | ||
| 8390 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 8391 | pub fn set_moder(&mut self, n: usize, val: super::vals::Moder) { | ||
| 8392 | assert!(n < 16usize); | ||
| 8393 | let offs = 0usize + n * 2usize; | ||
| 8394 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 8395 | } | ||
| 8396 | } | ||
| 8397 | impl Default for Moder { | ||
| 8398 | fn default() -> Moder { | ||
| 8399 | Moder(0) | ||
| 8400 | } | ||
| 8401 | } | ||
| 8402 | #[doc = "GPIO port output data register"] | ||
| 8403 | #[repr(transparent)] | ||
| 8404 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8405 | pub struct Odr(pub u32); | ||
| 8406 | impl Odr { | ||
| 8407 | #[doc = "Port output data (y = 0..15)"] | ||
| 8408 | pub fn odr(&self, n: usize) -> super::vals::Odr { | ||
| 8409 | assert!(n < 16usize); | ||
| 8410 | let offs = 0usize + n * 1usize; | ||
| 8411 | let val = (self.0 >> offs) & 0x01; | ||
| 8412 | super::vals::Odr(val as u8) | ||
| 8413 | } | ||
| 8414 | #[doc = "Port output data (y = 0..15)"] | ||
| 8415 | pub fn set_odr(&mut self, n: usize, val: super::vals::Odr) { | ||
| 8416 | assert!(n < 16usize); | ||
| 8417 | let offs = 0usize + n * 1usize; | ||
| 8418 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 8419 | } | ||
| 8420 | } | ||
| 8421 | impl Default for Odr { | ||
| 8422 | fn default() -> Odr { | ||
| 8423 | Odr(0) | ||
| 8424 | } | ||
| 8425 | } | ||
| 8426 | #[doc = "GPIO port output type register"] | ||
| 8427 | #[repr(transparent)] | ||
| 8428 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8429 | pub struct Otyper(pub u32); | ||
| 8430 | impl Otyper { | ||
| 8431 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 8432 | pub fn ot(&self, n: usize) -> super::vals::Ot { | ||
| 8433 | assert!(n < 16usize); | ||
| 8434 | let offs = 0usize + n * 1usize; | ||
| 8435 | let val = (self.0 >> offs) & 0x01; | ||
| 8436 | super::vals::Ot(val as u8) | ||
| 8437 | } | ||
| 8438 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 8439 | pub fn set_ot(&mut self, n: usize, val: super::vals::Ot) { | ||
| 8440 | assert!(n < 16usize); | ||
| 8441 | let offs = 0usize + n * 1usize; | ||
| 8442 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 8443 | } | ||
| 8444 | } | ||
| 8445 | impl Default for Otyper { | ||
| 8446 | fn default() -> Otyper { | ||
| 8447 | Otyper(0) | ||
| 8448 | } | ||
| 8449 | } | ||
| 8450 | #[doc = "GPIO port pull-up/pull-down register"] | ||
| 8451 | #[repr(transparent)] | ||
| 8452 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8453 | pub struct Pupdr(pub u32); | ||
| 8454 | impl Pupdr { | ||
| 8455 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 8456 | pub fn pupdr(&self, n: usize) -> super::vals::Pupdr { | ||
| 8457 | assert!(n < 16usize); | ||
| 8458 | let offs = 0usize + n * 2usize; | ||
| 8459 | let val = (self.0 >> offs) & 0x03; | ||
| 8460 | super::vals::Pupdr(val as u8) | ||
| 8461 | } | ||
| 8462 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 8463 | pub fn set_pupdr(&mut self, n: usize, val: super::vals::Pupdr) { | ||
| 8464 | assert!(n < 16usize); | ||
| 8465 | let offs = 0usize + n * 2usize; | ||
| 8466 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 8467 | } | ||
| 8468 | } | ||
| 8469 | impl Default for Pupdr { | ||
| 8470 | fn default() -> Pupdr { | ||
| 8471 | Pupdr(0) | ||
| 8472 | } | ||
| 8473 | } | ||
| 8474 | #[doc = "GPIO alternate function register"] | ||
| 8475 | #[repr(transparent)] | ||
| 8476 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8477 | pub struct Afr(pub u32); | ||
| 8478 | impl Afr { | ||
| 8479 | #[doc = "Alternate function selection for port x bit y (y = 0..15)"] | ||
| 8480 | pub fn afr(&self, n: usize) -> super::vals::Afr { | ||
| 8481 | assert!(n < 8usize); | ||
| 8482 | let offs = 0usize + n * 4usize; | ||
| 8483 | let val = (self.0 >> offs) & 0x0f; | ||
| 8484 | super::vals::Afr(val as u8) | ||
| 8485 | } | ||
| 8486 | #[doc = "Alternate function selection for port x bit y (y = 0..15)"] | ||
| 8487 | pub fn set_afr(&mut self, n: usize, val: super::vals::Afr) { | ||
| 8488 | assert!(n < 8usize); | ||
| 8489 | let offs = 0usize + n * 4usize; | ||
| 8490 | self.0 = (self.0 & !(0x0f << offs)) | (((val.0 as u32) & 0x0f) << offs); | ||
| 8491 | } | ||
| 8492 | } | ||
| 8493 | impl Default for Afr { | ||
| 8494 | fn default() -> Afr { | ||
| 8495 | Afr(0) | ||
| 8496 | } | ||
| 8497 | } | ||
| 8498 | #[doc = "GPIO port input data register"] | ||
| 8499 | #[repr(transparent)] | ||
| 8500 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8501 | pub struct Idr(pub u32); | ||
| 8502 | impl Idr { | ||
| 8503 | #[doc = "Port input data (y = 0..15)"] | ||
| 8504 | pub fn idr(&self, n: usize) -> super::vals::Idr { | ||
| 8505 | assert!(n < 16usize); | ||
| 8506 | let offs = 0usize + n * 1usize; | ||
| 8507 | let val = (self.0 >> offs) & 0x01; | ||
| 8508 | super::vals::Idr(val as u8) | ||
| 8509 | } | ||
| 8510 | #[doc = "Port input data (y = 0..15)"] | ||
| 8511 | pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) { | ||
| 8512 | assert!(n < 16usize); | ||
| 8513 | let offs = 0usize + n * 1usize; | ||
| 8514 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 8515 | } | ||
| 8516 | } | ||
| 8517 | impl Default for Idr { | ||
| 8518 | fn default() -> Idr { | ||
| 8519 | Idr(0) | ||
| 8520 | } | ||
| 8521 | } | ||
| 8522 | #[doc = "GPIO port configuration lock register"] | ||
| 8523 | #[repr(transparent)] | ||
| 8524 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8525 | pub struct Lckr(pub u32); | ||
| 8526 | impl Lckr { | ||
| 8527 | #[doc = "Port x lock bit y (y= 0..15)"] | ||
| 8528 | pub fn lck(&self, n: usize) -> super::vals::Lck { | ||
| 8529 | assert!(n < 16usize); | ||
| 8530 | let offs = 0usize + n * 1usize; | ||
| 8531 | let val = (self.0 >> offs) & 0x01; | ||
| 8532 | super::vals::Lck(val as u8) | ||
| 8533 | } | ||
| 8534 | #[doc = "Port x lock bit y (y= 0..15)"] | ||
| 8535 | pub fn set_lck(&mut self, n: usize, val: super::vals::Lck) { | ||
| 8536 | assert!(n < 16usize); | ||
| 8537 | let offs = 0usize + n * 1usize; | ||
| 8538 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 8539 | } | ||
| 8540 | #[doc = "Port x lock bit y (y= 0..15)"] | ||
| 8541 | pub const fn lckk(&self) -> super::vals::Lckk { | ||
| 8542 | let val = (self.0 >> 16usize) & 0x01; | ||
| 8543 | super::vals::Lckk(val as u8) | ||
| 8544 | } | ||
| 8545 | #[doc = "Port x lock bit y (y= 0..15)"] | ||
| 8546 | pub fn set_lckk(&mut self, val: super::vals::Lckk) { | ||
| 8547 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val.0 as u32) & 0x01) << 16usize); | ||
| 8548 | } | ||
| 8549 | } | ||
| 8550 | impl Default for Lckr { | ||
| 8551 | fn default() -> Lckr { | ||
| 8552 | Lckr(0) | ||
| 8553 | } | ||
| 8554 | } | ||
| 8555 | } | ||
| 8556 | pub mod vals { | ||
| 8557 | use crate::generic::*; | ||
| 8558 | #[repr(transparent)] | ||
| 8559 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8560 | pub struct Bsw(pub u8); | ||
| 8561 | impl Bsw { | ||
| 8562 | #[doc = "Sets the corresponding ODRx bit"] | ||
| 8563 | pub const SET: Self = Self(0x01); | ||
| 8564 | } | ||
| 8565 | #[repr(transparent)] | ||
| 8566 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8567 | pub struct Lck(pub u8); | ||
| 8568 | impl Lck { | ||
| 8569 | #[doc = "Port configuration not locked"] | ||
| 8570 | pub const UNLOCKED: Self = Self(0); | ||
| 8571 | #[doc = "Port configuration locked"] | ||
| 8572 | pub const LOCKED: Self = Self(0x01); | ||
| 8573 | } | ||
| 8574 | #[repr(transparent)] | ||
| 8575 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8576 | pub struct Pupdr(pub u8); | ||
| 8577 | impl Pupdr { | ||
| 8578 | #[doc = "No pull-up, pull-down"] | ||
| 8579 | pub const FLOATING: Self = Self(0); | ||
| 8580 | #[doc = "Pull-up"] | ||
| 8581 | pub const PULLUP: Self = Self(0x01); | ||
| 8582 | #[doc = "Pull-down"] | ||
| 8583 | pub const PULLDOWN: Self = Self(0x02); | ||
| 8584 | } | ||
| 8585 | #[repr(transparent)] | ||
| 8586 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8587 | pub struct Lckk(pub u8); | ||
| 8588 | impl Lckk { | ||
| 8589 | #[doc = "Port configuration lock key not active"] | ||
| 8590 | pub const NOTACTIVE: Self = Self(0); | ||
| 8591 | #[doc = "Port configuration lock key active"] | ||
| 8592 | pub const ACTIVE: Self = Self(0x01); | ||
| 8593 | } | ||
| 8594 | #[repr(transparent)] | ||
| 8595 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8596 | pub struct Ot(pub u8); | ||
| 8597 | impl Ot { | ||
| 8598 | #[doc = "Output push-pull (reset state)"] | ||
| 8599 | pub const PUSHPULL: Self = Self(0); | ||
| 8600 | #[doc = "Output open-drain"] | ||
| 8601 | pub const OPENDRAIN: Self = Self(0x01); | ||
| 8602 | } | ||
| 8603 | #[repr(transparent)] | ||
| 8604 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8605 | pub struct Ospeedr(pub u8); | ||
| 8606 | impl Ospeedr { | ||
| 8607 | #[doc = "Low speed"] | ||
| 8608 | pub const LOWSPEED: Self = Self(0); | ||
| 8609 | #[doc = "Medium speed"] | ||
| 8610 | pub const MEDIUMSPEED: Self = Self(0x01); | ||
| 8611 | #[doc = "High speed"] | ||
| 8612 | pub const HIGHSPEED: Self = Self(0x02); | ||
| 8613 | #[doc = "Very high speed"] | ||
| 8614 | pub const VERYHIGHSPEED: Self = Self(0x03); | ||
| 8615 | } | ||
| 8616 | #[repr(transparent)] | ||
| 8617 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8618 | pub struct Brw(pub u8); | ||
| 8619 | impl Brw { | ||
| 8620 | #[doc = "Resets the corresponding ODRx bit"] | ||
| 8621 | pub const RESET: Self = Self(0x01); | ||
| 8622 | } | ||
| 8623 | #[repr(transparent)] | ||
| 8624 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8625 | pub struct Afr(pub u8); | ||
| 8626 | impl Afr { | ||
| 8627 | #[doc = "AF0"] | ||
| 8628 | pub const AF0: Self = Self(0); | ||
| 8629 | #[doc = "AF1"] | ||
| 8630 | pub const AF1: Self = Self(0x01); | ||
| 8631 | #[doc = "AF2"] | ||
| 8632 | pub const AF2: Self = Self(0x02); | ||
| 8633 | #[doc = "AF3"] | ||
| 8634 | pub const AF3: Self = Self(0x03); | ||
| 8635 | #[doc = "AF4"] | ||
| 8636 | pub const AF4: Self = Self(0x04); | ||
| 8637 | #[doc = "AF5"] | ||
| 8638 | pub const AF5: Self = Self(0x05); | ||
| 8639 | #[doc = "AF6"] | ||
| 8640 | pub const AF6: Self = Self(0x06); | ||
| 8641 | #[doc = "AF7"] | ||
| 8642 | pub const AF7: Self = Self(0x07); | ||
| 8643 | #[doc = "AF8"] | ||
| 8644 | pub const AF8: Self = Self(0x08); | ||
| 8645 | #[doc = "AF9"] | ||
| 8646 | pub const AF9: Self = Self(0x09); | ||
| 8647 | #[doc = "AF10"] | ||
| 8648 | pub const AF10: Self = Self(0x0a); | ||
| 8649 | #[doc = "AF11"] | ||
| 8650 | pub const AF11: Self = Self(0x0b); | ||
| 8651 | #[doc = "AF12"] | ||
| 8652 | pub const AF12: Self = Self(0x0c); | ||
| 8653 | #[doc = "AF13"] | ||
| 8654 | pub const AF13: Self = Self(0x0d); | ||
| 8655 | #[doc = "AF14"] | ||
| 8656 | pub const AF14: Self = Self(0x0e); | ||
| 8657 | #[doc = "AF15"] | ||
| 8658 | pub const AF15: Self = Self(0x0f); | ||
| 8659 | } | ||
| 8660 | #[repr(transparent)] | ||
| 8661 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8662 | pub struct Odr(pub u8); | ||
| 8663 | impl Odr { | ||
| 8664 | #[doc = "Set output to logic low"] | ||
| 8665 | pub const LOW: Self = Self(0); | ||
| 8666 | #[doc = "Set output to logic high"] | ||
| 8667 | pub const HIGH: Self = Self(0x01); | ||
| 8668 | } | ||
| 8669 | #[repr(transparent)] | ||
| 8670 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8671 | pub struct Idr(pub u8); | ||
| 8672 | impl Idr { | ||
| 8673 | #[doc = "Input is logic low"] | ||
| 8674 | pub const LOW: Self = Self(0); | ||
| 8675 | #[doc = "Input is logic high"] | ||
| 8676 | pub const HIGH: Self = Self(0x01); | ||
| 8677 | } | ||
| 8678 | #[repr(transparent)] | ||
| 8679 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8680 | pub struct Moder(pub u8); | ||
| 8681 | impl Moder { | ||
| 8682 | #[doc = "Input mode (reset state)"] | ||
| 8683 | pub const INPUT: Self = Self(0); | ||
| 8684 | #[doc = "General purpose output mode"] | ||
| 8685 | pub const OUTPUT: Self = Self(0x01); | ||
| 8686 | #[doc = "Alternate function mode"] | ||
| 8687 | pub const ALTERNATE: Self = Self(0x02); | ||
| 8688 | #[doc = "Analog mode"] | ||
| 8689 | pub const ANALOG: Self = Self(0x03); | ||
| 8690 | } | ||
| 8691 | } | ||
| 8692 | } | ||
| 8693 | pub mod exti_v1 { | ||
| 8694 | use crate::generic::*; | ||
| 8695 | #[doc = "External interrupt/event controller"] | ||
| 8696 | #[derive(Copy, Clone)] | ||
| 8697 | pub struct Exti(pub *mut u8); | ||
| 8698 | unsafe impl Send for Exti {} | ||
| 8699 | unsafe impl Sync for Exti {} | ||
| 8700 | impl Exti { | ||
| 8701 | #[doc = "Interrupt mask register (EXTI_IMR)"] | ||
| 8702 | pub fn imr(self) -> Reg<regs::Imr, RW> { | ||
| 8703 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 8704 | } | ||
| 8705 | #[doc = "Event mask register (EXTI_EMR)"] | ||
| 8706 | pub fn emr(self) -> Reg<regs::Emr, RW> { | ||
| 8707 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 8708 | } | ||
| 8709 | #[doc = "Rising Trigger selection register (EXTI_RTSR)"] | ||
| 8710 | pub fn rtsr(self) -> Reg<regs::Rtsr, RW> { | ||
| 8711 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 8712 | } | ||
| 8713 | #[doc = "Falling Trigger selection register (EXTI_FTSR)"] | ||
| 8714 | pub fn ftsr(self) -> Reg<regs::Ftsr, RW> { | ||
| 8715 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 8716 | } | ||
| 8717 | #[doc = "Software interrupt event register (EXTI_SWIER)"] | ||
| 8718 | pub fn swier(self) -> Reg<regs::Swier, RW> { | ||
| 8719 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 8720 | } | ||
| 8721 | #[doc = "Pending register (EXTI_PR)"] | ||
| 8722 | pub fn pr(self) -> Reg<regs::Pr, RW> { | ||
| 8723 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | ||
| 8724 | } | ||
| 8725 | } | ||
| 8726 | pub mod regs { | ||
| 8727 | use crate::generic::*; | ||
| 8728 | #[doc = "Software interrupt event register (EXTI_SWIER)"] | ||
| 8729 | #[repr(transparent)] | ||
| 8730 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8731 | pub struct Swier(pub u32); | ||
| 8732 | impl Swier { | ||
| 8733 | #[doc = "Software Interrupt on line 0"] | ||
| 8734 | pub fn swier(&self, n: usize) -> bool { | ||
| 8735 | assert!(n < 23usize); | ||
| 8736 | let offs = 0usize + n * 1usize; | ||
| 8737 | let val = (self.0 >> offs) & 0x01; | ||
| 8738 | val != 0 | ||
| 8739 | } | ||
| 8740 | #[doc = "Software Interrupt on line 0"] | ||
| 8741 | pub fn set_swier(&mut self, n: usize, val: bool) { | ||
| 8742 | assert!(n < 23usize); | ||
| 8743 | let offs = 0usize + n * 1usize; | ||
| 8744 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 8745 | } | ||
| 8746 | } | ||
| 8747 | impl Default for Swier { | ||
| 8748 | fn default() -> Swier { | ||
| 8749 | Swier(0) | ||
| 8750 | } | ||
| 8751 | } | ||
| 8752 | #[doc = "Pending register (EXTI_PR)"] | ||
| 8753 | #[repr(transparent)] | ||
| 8754 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8755 | pub struct Pr(pub u32); | ||
| 8756 | impl Pr { | ||
| 8757 | #[doc = "Pending bit 0"] | ||
| 8758 | pub fn pr(&self, n: usize) -> bool { | ||
| 8759 | assert!(n < 23usize); | ||
| 8760 | let offs = 0usize + n * 1usize; | ||
| 8761 | let val = (self.0 >> offs) & 0x01; | ||
| 8762 | val != 0 | ||
| 8763 | } | ||
| 8764 | #[doc = "Pending bit 0"] | ||
| 8765 | pub fn set_pr(&mut self, n: usize, val: bool) { | ||
| 8766 | assert!(n < 23usize); | ||
| 8767 | let offs = 0usize + n * 1usize; | ||
| 8768 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 8769 | } | ||
| 8770 | } | ||
| 8771 | impl Default for Pr { | ||
| 8772 | fn default() -> Pr { | ||
| 8773 | Pr(0) | ||
| 8774 | } | ||
| 8775 | } | ||
| 8776 | #[doc = "Falling Trigger selection register (EXTI_FTSR)"] | ||
| 8777 | #[repr(transparent)] | ||
| 8778 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8779 | pub struct Ftsr(pub u32); | ||
| 8780 | impl Ftsr { | ||
| 8781 | #[doc = "Falling trigger event configuration of line 0"] | ||
| 8782 | pub fn tr(&self, n: usize) -> super::vals::Tr { | ||
| 8783 | assert!(n < 23usize); | ||
| 8784 | let offs = 0usize + n * 1usize; | ||
| 8785 | let val = (self.0 >> offs) & 0x01; | ||
| 8786 | super::vals::Tr(val as u8) | ||
| 8787 | } | ||
| 8788 | #[doc = "Falling trigger event configuration of line 0"] | ||
| 8789 | pub fn set_tr(&mut self, n: usize, val: super::vals::Tr) { | ||
| 8790 | assert!(n < 23usize); | ||
| 8791 | let offs = 0usize + n * 1usize; | ||
| 8792 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 8793 | } | ||
| 8794 | } | ||
| 8795 | impl Default for Ftsr { | ||
| 8796 | fn default() -> Ftsr { | ||
| 8797 | Ftsr(0) | ||
| 8798 | } | ||
| 8799 | } | ||
| 8800 | #[doc = "Event mask register (EXTI_EMR)"] | ||
| 8801 | #[repr(transparent)] | ||
| 8802 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8803 | pub struct Emr(pub u32); | ||
| 8804 | impl Emr { | ||
| 8805 | #[doc = "Event Mask on line 0"] | ||
| 8806 | pub fn mr(&self, n: usize) -> super::vals::Mr { | ||
| 8807 | assert!(n < 23usize); | ||
| 8808 | let offs = 0usize + n * 1usize; | ||
| 8809 | let val = (self.0 >> offs) & 0x01; | ||
| 8810 | super::vals::Mr(val as u8) | ||
| 8811 | } | ||
| 8812 | #[doc = "Event Mask on line 0"] | ||
| 8813 | pub fn set_mr(&mut self, n: usize, val: super::vals::Mr) { | ||
| 8814 | assert!(n < 23usize); | ||
| 8815 | let offs = 0usize + n * 1usize; | ||
| 8816 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 8817 | } | ||
| 8818 | } | ||
| 8819 | impl Default for Emr { | ||
| 8820 | fn default() -> Emr { | ||
| 8821 | Emr(0) | ||
| 8822 | } | ||
| 8823 | } | ||
| 8824 | #[doc = "Rising Trigger selection register (EXTI_RTSR)"] | ||
| 8825 | #[repr(transparent)] | ||
| 8826 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8827 | pub struct Rtsr(pub u32); | ||
| 8828 | impl Rtsr { | ||
| 8829 | #[doc = "Rising trigger event configuration of line 0"] | ||
| 8830 | pub fn tr(&self, n: usize) -> super::vals::Tr { | ||
| 8831 | assert!(n < 23usize); | ||
| 8832 | let offs = 0usize + n * 1usize; | ||
| 8833 | let val = (self.0 >> offs) & 0x01; | ||
| 8834 | super::vals::Tr(val as u8) | ||
| 8835 | } | ||
| 8836 | #[doc = "Rising trigger event configuration of line 0"] | ||
| 8837 | pub fn set_tr(&mut self, n: usize, val: super::vals::Tr) { | ||
| 8838 | assert!(n < 23usize); | ||
| 8839 | let offs = 0usize + n * 1usize; | ||
| 8840 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 8841 | } | ||
| 8842 | } | ||
| 8843 | impl Default for Rtsr { | ||
| 8844 | fn default() -> Rtsr { | ||
| 8845 | Rtsr(0) | ||
| 8846 | } | ||
| 8847 | } | ||
| 8848 | #[doc = "Interrupt mask register (EXTI_IMR)"] | ||
| 8849 | #[repr(transparent)] | ||
| 8850 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8851 | pub struct Imr(pub u32); | ||
| 8852 | impl Imr { | ||
| 8853 | #[doc = "Interrupt Mask on line 0"] | ||
| 8854 | pub fn mr(&self, n: usize) -> super::vals::Mr { | ||
| 8855 | assert!(n < 23usize); | ||
| 8856 | let offs = 0usize + n * 1usize; | ||
| 8857 | let val = (self.0 >> offs) & 0x01; | ||
| 8858 | super::vals::Mr(val as u8) | ||
| 8859 | } | ||
| 8860 | #[doc = "Interrupt Mask on line 0"] | ||
| 8861 | pub fn set_mr(&mut self, n: usize, val: super::vals::Mr) { | ||
| 8862 | assert!(n < 23usize); | ||
| 8863 | let offs = 0usize + n * 1usize; | ||
| 8864 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 8865 | } | ||
| 8866 | } | ||
| 8867 | impl Default for Imr { | ||
| 8868 | fn default() -> Imr { | ||
| 8869 | Imr(0) | ||
| 8870 | } | ||
| 8871 | } | ||
| 8872 | } | ||
| 8873 | pub mod vals { | ||
| 8874 | use crate::generic::*; | ||
| 8875 | #[repr(transparent)] | ||
| 8876 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8877 | pub struct Prw(pub u8); | ||
| 8878 | impl Prw { | ||
| 8879 | #[doc = "Clears pending bit"] | ||
| 8880 | pub const CLEAR: Self = Self(0x01); | ||
| 8881 | } | ||
| 8882 | #[repr(transparent)] | ||
| 8883 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8884 | pub struct Mr(pub u8); | ||
| 8885 | impl Mr { | ||
| 8886 | #[doc = "Interrupt request line is masked"] | ||
| 8887 | pub const MASKED: Self = Self(0); | ||
| 8888 | #[doc = "Interrupt request line is unmasked"] | ||
| 8889 | pub const UNMASKED: Self = Self(0x01); | ||
| 8890 | } | ||
| 8891 | #[repr(transparent)] | ||
| 8892 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8893 | pub struct Tr(pub u8); | ||
| 8894 | impl Tr { | ||
| 8895 | #[doc = "Falling edge trigger is disabled"] | ||
| 8896 | pub const DISABLED: Self = Self(0); | ||
| 8897 | #[doc = "Falling edge trigger is enabled"] | ||
| 8898 | pub const ENABLED: Self = Self(0x01); | ||
| 8899 | } | ||
| 8900 | #[repr(transparent)] | ||
| 8901 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8902 | pub struct Swierw(pub u8); | ||
| 8903 | impl Swierw { | ||
| 8904 | #[doc = "Generates an interrupt request"] | ||
| 8905 | pub const PEND: Self = Self(0x01); | ||
| 8906 | } | ||
| 8907 | #[repr(transparent)] | ||
| 8908 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8909 | pub struct Prr(pub u8); | ||
| 8910 | impl Prr { | ||
| 8911 | #[doc = "No trigger request occurred"] | ||
| 8912 | pub const NOTPENDING: Self = Self(0); | ||
| 8913 | #[doc = "Selected trigger request occurred"] | ||
| 8914 | pub const PENDING: Self = Self(0x01); | ||
| 8915 | } | ||
| 8916 | } | ||
| 8917 | } | ||
| 8918 | pub mod rng_v1 { | ||
| 8919 | use crate::generic::*; | ||
| 8920 | #[doc = "Random number generator"] | ||
| 8921 | #[derive(Copy, Clone)] | ||
| 8922 | pub struct Rng(pub *mut u8); | ||
| 8923 | unsafe impl Send for Rng {} | ||
| 8924 | unsafe impl Sync for Rng {} | ||
| 8925 | impl Rng { | ||
| 8926 | #[doc = "control register"] | ||
| 8927 | pub fn cr(self) -> Reg<regs::Cr, RW> { | ||
| 8928 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 8929 | } | ||
| 8930 | #[doc = "status register"] | ||
| 8931 | pub fn sr(self) -> Reg<regs::Sr, RW> { | ||
| 8932 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 8933 | } | ||
| 8934 | #[doc = "data register"] | ||
| 8935 | pub fn dr(self) -> Reg<u32, R> { | ||
| 8936 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 8937 | } | ||
| 8938 | } | ||
| 8939 | pub mod regs { | ||
| 8940 | use crate::generic::*; | ||
| 8941 | #[doc = "status register"] | ||
| 8942 | #[repr(transparent)] | ||
| 8943 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8944 | pub struct Sr(pub u32); | ||
| 8945 | impl Sr { | ||
| 8946 | #[doc = "Data ready"] | ||
| 8947 | pub const fn drdy(&self) -> bool { | ||
| 8948 | let val = (self.0 >> 0usize) & 0x01; | ||
| 8949 | val != 0 | ||
| 8950 | } | ||
| 8951 | #[doc = "Data ready"] | ||
| 8952 | pub fn set_drdy(&mut self, val: bool) { | ||
| 8953 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 8954 | } | ||
| 8955 | #[doc = "Clock error current status"] | ||
| 8956 | pub const fn cecs(&self) -> bool { | ||
| 8957 | let val = (self.0 >> 1usize) & 0x01; | ||
| 8958 | val != 0 | ||
| 8959 | } | ||
| 8960 | #[doc = "Clock error current status"] | ||
| 8961 | pub fn set_cecs(&mut self, val: bool) { | ||
| 8962 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 8963 | } | ||
| 8964 | #[doc = "Seed error current status"] | ||
| 8965 | pub const fn secs(&self) -> bool { | ||
| 8966 | let val = (self.0 >> 2usize) & 0x01; | ||
| 8967 | val != 0 | ||
| 8968 | } | ||
| 8969 | #[doc = "Seed error current status"] | ||
| 8970 | pub fn set_secs(&mut self, val: bool) { | ||
| 8971 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | ||
| 8972 | } | ||
| 8973 | #[doc = "Clock error interrupt status"] | ||
| 8974 | pub const fn ceis(&self) -> bool { | ||
| 8975 | let val = (self.0 >> 5usize) & 0x01; | ||
| 8976 | val != 0 | ||
| 8977 | } | ||
| 8978 | #[doc = "Clock error interrupt status"] | ||
| 8979 | pub fn set_ceis(&mut self, val: bool) { | ||
| 8980 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | ||
| 8981 | } | ||
| 8982 | #[doc = "Seed error interrupt status"] | ||
| 8983 | pub const fn seis(&self) -> bool { | ||
| 8984 | let val = (self.0 >> 6usize) & 0x01; | ||
| 8985 | val != 0 | ||
| 8986 | } | ||
| 8987 | #[doc = "Seed error interrupt status"] | ||
| 8988 | pub fn set_seis(&mut self, val: bool) { | ||
| 8989 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | ||
| 8990 | } | ||
| 8991 | } | ||
| 8992 | impl Default for Sr { | ||
| 8993 | fn default() -> Sr { | ||
| 8994 | Sr(0) | ||
| 8995 | } | ||
| 8996 | } | ||
| 8997 | #[doc = "control register"] | ||
| 8998 | #[repr(transparent)] | ||
| 8999 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 9000 | pub struct Cr(pub u32); | ||
| 9001 | impl Cr { | ||
| 9002 | #[doc = "Random number generator enable"] | ||
| 9003 | pub const fn rngen(&self) -> bool { | ||
| 9004 | let val = (self.0 >> 2usize) & 0x01; | ||
| 9005 | val != 0 | ||
| 9006 | } | ||
| 9007 | #[doc = "Random number generator enable"] | ||
| 9008 | pub fn set_rngen(&mut self, val: bool) { | ||
| 9009 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | ||
| 9010 | } | ||
| 9011 | #[doc = "Interrupt enable"] | ||
| 9012 | pub const fn ie(&self) -> bool { | ||
| 9013 | let val = (self.0 >> 3usize) & 0x01; | ||
| 9014 | val != 0 | ||
| 9015 | } | ||
| 9016 | #[doc = "Interrupt enable"] | ||
| 9017 | pub fn set_ie(&mut self, val: bool) { | ||
| 9018 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | ||
| 9019 | } | ||
| 9020 | } | ||
| 9021 | impl Default for Cr { | ||
| 9022 | fn default() -> Cr { | ||
| 9023 | Cr(0) | ||
| 9100 | } | 9024 | } |
| 9101 | } | 9025 | } |
| 9102 | } | 9026 | } |
diff --git a/embassy-stm32/src/pac/stm32f401cb.rs b/embassy-stm32/src/pac/stm32f401cb.rs index e5681dc32..cf1a81cfc 100644 --- a/embassy-stm32/src/pac/stm32f401cb.rs +++ b/embassy-stm32/src/pac/stm32f401cb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f401cc.rs b/embassy-stm32/src/pac/stm32f401cc.rs index e5681dc32..cf1a81cfc 100644 --- a/embassy-stm32/src/pac/stm32f401cc.rs +++ b/embassy-stm32/src/pac/stm32f401cc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f401cd.rs b/embassy-stm32/src/pac/stm32f401cd.rs index e5681dc32..cf1a81cfc 100644 --- a/embassy-stm32/src/pac/stm32f401cd.rs +++ b/embassy-stm32/src/pac/stm32f401cd.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f401ce.rs b/embassy-stm32/src/pac/stm32f401ce.rs index e5681dc32..cf1a81cfc 100644 --- a/embassy-stm32/src/pac/stm32f401ce.rs +++ b/embassy-stm32/src/pac/stm32f401ce.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f401rb.rs b/embassy-stm32/src/pac/stm32f401rb.rs index e5681dc32..cf1a81cfc 100644 --- a/embassy-stm32/src/pac/stm32f401rb.rs +++ b/embassy-stm32/src/pac/stm32f401rb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f401rc.rs b/embassy-stm32/src/pac/stm32f401rc.rs index e5681dc32..cf1a81cfc 100644 --- a/embassy-stm32/src/pac/stm32f401rc.rs +++ b/embassy-stm32/src/pac/stm32f401rc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f401rd.rs b/embassy-stm32/src/pac/stm32f401rd.rs index e5681dc32..cf1a81cfc 100644 --- a/embassy-stm32/src/pac/stm32f401rd.rs +++ b/embassy-stm32/src/pac/stm32f401rd.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f401re.rs b/embassy-stm32/src/pac/stm32f401re.rs index e5681dc32..cf1a81cfc 100644 --- a/embassy-stm32/src/pac/stm32f401re.rs +++ b/embassy-stm32/src/pac/stm32f401re.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f401vb.rs b/embassy-stm32/src/pac/stm32f401vb.rs index 12e33c160..e14efa824 100644 --- a/embassy-stm32/src/pac/stm32f401vb.rs +++ b/embassy-stm32/src/pac/stm32f401vb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f401vc.rs b/embassy-stm32/src/pac/stm32f401vc.rs index 12e33c160..e14efa824 100644 --- a/embassy-stm32/src/pac/stm32f401vc.rs +++ b/embassy-stm32/src/pac/stm32f401vc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f401vd.rs b/embassy-stm32/src/pac/stm32f401vd.rs index 12e33c160..e14efa824 100644 --- a/embassy-stm32/src/pac/stm32f401vd.rs +++ b/embassy-stm32/src/pac/stm32f401vd.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f401ve.rs b/embassy-stm32/src/pac/stm32f401ve.rs index 12e33c160..e14efa824 100644 --- a/embassy-stm32/src/pac/stm32f401ve.rs +++ b/embassy-stm32/src/pac/stm32f401ve.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f405oe.rs b/embassy-stm32/src/pac/stm32f405oe.rs index 66fb4f9a4..db3aaf80c 100644 --- a/embassy-stm32/src/pac/stm32f405oe.rs +++ b/embassy-stm32/src/pac/stm32f405oe.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f405og.rs b/embassy-stm32/src/pac/stm32f405og.rs index 66fb4f9a4..db3aaf80c 100644 --- a/embassy-stm32/src/pac/stm32f405og.rs +++ b/embassy-stm32/src/pac/stm32f405og.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f405rg.rs b/embassy-stm32/src/pac/stm32f405rg.rs index 66fb4f9a4..db3aaf80c 100644 --- a/embassy-stm32/src/pac/stm32f405rg.rs +++ b/embassy-stm32/src/pac/stm32f405rg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f405vg.rs b/embassy-stm32/src/pac/stm32f405vg.rs index 66fb4f9a4..db3aaf80c 100644 --- a/embassy-stm32/src/pac/stm32f405vg.rs +++ b/embassy-stm32/src/pac/stm32f405vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f405zg.rs b/embassy-stm32/src/pac/stm32f405zg.rs index 66fb4f9a4..db3aaf80c 100644 --- a/embassy-stm32/src/pac/stm32f405zg.rs +++ b/embassy-stm32/src/pac/stm32f405zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f407ie.rs b/embassy-stm32/src/pac/stm32f407ie.rs index 28d64b6d7..8c0d1cc60 100644 --- a/embassy-stm32/src/pac/stm32f407ie.rs +++ b/embassy-stm32/src/pac/stm32f407ie.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f407ig.rs b/embassy-stm32/src/pac/stm32f407ig.rs index 28d64b6d7..8c0d1cc60 100644 --- a/embassy-stm32/src/pac/stm32f407ig.rs +++ b/embassy-stm32/src/pac/stm32f407ig.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f407ve.rs b/embassy-stm32/src/pac/stm32f407ve.rs index 28d64b6d7..8c0d1cc60 100644 --- a/embassy-stm32/src/pac/stm32f407ve.rs +++ b/embassy-stm32/src/pac/stm32f407ve.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f407vg.rs b/embassy-stm32/src/pac/stm32f407vg.rs index 28d64b6d7..8c0d1cc60 100644 --- a/embassy-stm32/src/pac/stm32f407vg.rs +++ b/embassy-stm32/src/pac/stm32f407vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f407ze.rs b/embassy-stm32/src/pac/stm32f407ze.rs index 28d64b6d7..8c0d1cc60 100644 --- a/embassy-stm32/src/pac/stm32f407ze.rs +++ b/embassy-stm32/src/pac/stm32f407ze.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f407zg.rs b/embassy-stm32/src/pac/stm32f407zg.rs index 28d64b6d7..8c0d1cc60 100644 --- a/embassy-stm32/src/pac/stm32f407zg.rs +++ b/embassy-stm32/src/pac/stm32f407zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f410c8.rs b/embassy-stm32/src/pac/stm32f410c8.rs index c84702548..e664c6811 100644 --- a/embassy-stm32/src/pac/stm32f410c8.rs +++ b/embassy-stm32/src/pac/stm32f410c8.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f410cb.rs b/embassy-stm32/src/pac/stm32f410cb.rs index c84702548..e664c6811 100644 --- a/embassy-stm32/src/pac/stm32f410cb.rs +++ b/embassy-stm32/src/pac/stm32f410cb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f410r8.rs b/embassy-stm32/src/pac/stm32f410r8.rs index c84702548..e664c6811 100644 --- a/embassy-stm32/src/pac/stm32f410r8.rs +++ b/embassy-stm32/src/pac/stm32f410r8.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f410rb.rs b/embassy-stm32/src/pac/stm32f410rb.rs index c84702548..e664c6811 100644 --- a/embassy-stm32/src/pac/stm32f410rb.rs +++ b/embassy-stm32/src/pac/stm32f410rb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f410t8.rs b/embassy-stm32/src/pac/stm32f410t8.rs index 0c7b75136..16d91e9e6 100644 --- a/embassy-stm32/src/pac/stm32f410t8.rs +++ b/embassy-stm32/src/pac/stm32f410t8.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f410tb.rs b/embassy-stm32/src/pac/stm32f410tb.rs index 0c7b75136..16d91e9e6 100644 --- a/embassy-stm32/src/pac/stm32f410tb.rs +++ b/embassy-stm32/src/pac/stm32f410tb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f411cc.rs b/embassy-stm32/src/pac/stm32f411cc.rs index c78d48061..06edeb323 100644 --- a/embassy-stm32/src/pac/stm32f411cc.rs +++ b/embassy-stm32/src/pac/stm32f411cc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f411ce.rs b/embassy-stm32/src/pac/stm32f411ce.rs index c78d48061..06edeb323 100644 --- a/embassy-stm32/src/pac/stm32f411ce.rs +++ b/embassy-stm32/src/pac/stm32f411ce.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f411rc.rs b/embassy-stm32/src/pac/stm32f411rc.rs index c78d48061..06edeb323 100644 --- a/embassy-stm32/src/pac/stm32f411rc.rs +++ b/embassy-stm32/src/pac/stm32f411rc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f411re.rs b/embassy-stm32/src/pac/stm32f411re.rs index c78d48061..06edeb323 100644 --- a/embassy-stm32/src/pac/stm32f411re.rs +++ b/embassy-stm32/src/pac/stm32f411re.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f411vc.rs b/embassy-stm32/src/pac/stm32f411vc.rs index c78d48061..06edeb323 100644 --- a/embassy-stm32/src/pac/stm32f411vc.rs +++ b/embassy-stm32/src/pac/stm32f411vc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f411ve.rs b/embassy-stm32/src/pac/stm32f411ve.rs index c78d48061..06edeb323 100644 --- a/embassy-stm32/src/pac/stm32f411ve.rs +++ b/embassy-stm32/src/pac/stm32f411ve.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f412ce.rs b/embassy-stm32/src/pac/stm32f412ce.rs index 482e667e7..ef966fef9 100644 --- a/embassy-stm32/src/pac/stm32f412ce.rs +++ b/embassy-stm32/src/pac/stm32f412ce.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f412cg.rs b/embassy-stm32/src/pac/stm32f412cg.rs index 482e667e7..ef966fef9 100644 --- a/embassy-stm32/src/pac/stm32f412cg.rs +++ b/embassy-stm32/src/pac/stm32f412cg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f412re.rs b/embassy-stm32/src/pac/stm32f412re.rs index 3732fb172..12b3976de 100644 --- a/embassy-stm32/src/pac/stm32f412re.rs +++ b/embassy-stm32/src/pac/stm32f412re.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f412rg.rs b/embassy-stm32/src/pac/stm32f412rg.rs index 3732fb172..12b3976de 100644 --- a/embassy-stm32/src/pac/stm32f412rg.rs +++ b/embassy-stm32/src/pac/stm32f412rg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f412ve.rs b/embassy-stm32/src/pac/stm32f412ve.rs index ca1d669f7..adcb48bc0 100644 --- a/embassy-stm32/src/pac/stm32f412ve.rs +++ b/embassy-stm32/src/pac/stm32f412ve.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f412vg.rs b/embassy-stm32/src/pac/stm32f412vg.rs index ca1d669f7..adcb48bc0 100644 --- a/embassy-stm32/src/pac/stm32f412vg.rs +++ b/embassy-stm32/src/pac/stm32f412vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f412ze.rs b/embassy-stm32/src/pac/stm32f412ze.rs index ca1d669f7..adcb48bc0 100644 --- a/embassy-stm32/src/pac/stm32f412ze.rs +++ b/embassy-stm32/src/pac/stm32f412ze.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f412zg.rs b/embassy-stm32/src/pac/stm32f412zg.rs index ca1d669f7..adcb48bc0 100644 --- a/embassy-stm32/src/pac/stm32f412zg.rs +++ b/embassy-stm32/src/pac/stm32f412zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f413cg.rs b/embassy-stm32/src/pac/stm32f413cg.rs index 9eedd31e4..6ed0d350c 100644 --- a/embassy-stm32/src/pac/stm32f413cg.rs +++ b/embassy-stm32/src/pac/stm32f413cg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f413ch.rs b/embassy-stm32/src/pac/stm32f413ch.rs index 9eedd31e4..6ed0d350c 100644 --- a/embassy-stm32/src/pac/stm32f413ch.rs +++ b/embassy-stm32/src/pac/stm32f413ch.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f413mg.rs b/embassy-stm32/src/pac/stm32f413mg.rs index 718ff7fc3..690fb5279 100644 --- a/embassy-stm32/src/pac/stm32f413mg.rs +++ b/embassy-stm32/src/pac/stm32f413mg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f413mh.rs b/embassy-stm32/src/pac/stm32f413mh.rs index 718ff7fc3..690fb5279 100644 --- a/embassy-stm32/src/pac/stm32f413mh.rs +++ b/embassy-stm32/src/pac/stm32f413mh.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f413rg.rs b/embassy-stm32/src/pac/stm32f413rg.rs index 718ff7fc3..690fb5279 100644 --- a/embassy-stm32/src/pac/stm32f413rg.rs +++ b/embassy-stm32/src/pac/stm32f413rg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f413rh.rs b/embassy-stm32/src/pac/stm32f413rh.rs index 718ff7fc3..690fb5279 100644 --- a/embassy-stm32/src/pac/stm32f413rh.rs +++ b/embassy-stm32/src/pac/stm32f413rh.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f413vg.rs b/embassy-stm32/src/pac/stm32f413vg.rs index 718ff7fc3..690fb5279 100644 --- a/embassy-stm32/src/pac/stm32f413vg.rs +++ b/embassy-stm32/src/pac/stm32f413vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f413vh.rs b/embassy-stm32/src/pac/stm32f413vh.rs index 718ff7fc3..690fb5279 100644 --- a/embassy-stm32/src/pac/stm32f413vh.rs +++ b/embassy-stm32/src/pac/stm32f413vh.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f413zg.rs b/embassy-stm32/src/pac/stm32f413zg.rs index 718ff7fc3..690fb5279 100644 --- a/embassy-stm32/src/pac/stm32f413zg.rs +++ b/embassy-stm32/src/pac/stm32f413zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f413zh.rs b/embassy-stm32/src/pac/stm32f413zh.rs index 718ff7fc3..690fb5279 100644 --- a/embassy-stm32/src/pac/stm32f413zh.rs +++ b/embassy-stm32/src/pac/stm32f413zh.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f415og.rs b/embassy-stm32/src/pac/stm32f415og.rs index 0e429ffef..92a3a71a5 100644 --- a/embassy-stm32/src/pac/stm32f415og.rs +++ b/embassy-stm32/src/pac/stm32f415og.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f415rg.rs b/embassy-stm32/src/pac/stm32f415rg.rs index 0e429ffef..92a3a71a5 100644 --- a/embassy-stm32/src/pac/stm32f415rg.rs +++ b/embassy-stm32/src/pac/stm32f415rg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f415vg.rs b/embassy-stm32/src/pac/stm32f415vg.rs index 0e429ffef..92a3a71a5 100644 --- a/embassy-stm32/src/pac/stm32f415vg.rs +++ b/embassy-stm32/src/pac/stm32f415vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f415zg.rs b/embassy-stm32/src/pac/stm32f415zg.rs index 0e429ffef..92a3a71a5 100644 --- a/embassy-stm32/src/pac/stm32f415zg.rs +++ b/embassy-stm32/src/pac/stm32f415zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f417ie.rs b/embassy-stm32/src/pac/stm32f417ie.rs index f8e463029..3db62128b 100644 --- a/embassy-stm32/src/pac/stm32f417ie.rs +++ b/embassy-stm32/src/pac/stm32f417ie.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f417ig.rs b/embassy-stm32/src/pac/stm32f417ig.rs index f8e463029..3db62128b 100644 --- a/embassy-stm32/src/pac/stm32f417ig.rs +++ b/embassy-stm32/src/pac/stm32f417ig.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f417ve.rs b/embassy-stm32/src/pac/stm32f417ve.rs index f8e463029..3db62128b 100644 --- a/embassy-stm32/src/pac/stm32f417ve.rs +++ b/embassy-stm32/src/pac/stm32f417ve.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f417vg.rs b/embassy-stm32/src/pac/stm32f417vg.rs index f8e463029..3db62128b 100644 --- a/embassy-stm32/src/pac/stm32f417vg.rs +++ b/embassy-stm32/src/pac/stm32f417vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f417ze.rs b/embassy-stm32/src/pac/stm32f417ze.rs index f8e463029..3db62128b 100644 --- a/embassy-stm32/src/pac/stm32f417ze.rs +++ b/embassy-stm32/src/pac/stm32f417ze.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f417zg.rs b/embassy-stm32/src/pac/stm32f417zg.rs index f8e463029..3db62128b 100644 --- a/embassy-stm32/src/pac/stm32f417zg.rs +++ b/embassy-stm32/src/pac/stm32f417zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f423ch.rs b/embassy-stm32/src/pac/stm32f423ch.rs index c0bddb16c..03601799d 100644 --- a/embassy-stm32/src/pac/stm32f423ch.rs +++ b/embassy-stm32/src/pac/stm32f423ch.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f423mh.rs b/embassy-stm32/src/pac/stm32f423mh.rs index c6a327af4..d21c2a7c1 100644 --- a/embassy-stm32/src/pac/stm32f423mh.rs +++ b/embassy-stm32/src/pac/stm32f423mh.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f423rh.rs b/embassy-stm32/src/pac/stm32f423rh.rs index c6a327af4..d21c2a7c1 100644 --- a/embassy-stm32/src/pac/stm32f423rh.rs +++ b/embassy-stm32/src/pac/stm32f423rh.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f423vh.rs b/embassy-stm32/src/pac/stm32f423vh.rs index c6a327af4..d21c2a7c1 100644 --- a/embassy-stm32/src/pac/stm32f423vh.rs +++ b/embassy-stm32/src/pac/stm32f423vh.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f423zh.rs b/embassy-stm32/src/pac/stm32f423zh.rs index c6a327af4..d21c2a7c1 100644 --- a/embassy-stm32/src/pac/stm32f423zh.rs +++ b/embassy-stm32/src/pac/stm32f423zh.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f427ag.rs b/embassy-stm32/src/pac/stm32f427ag.rs index 847ddd3e4..5b239485c 100644 --- a/embassy-stm32/src/pac/stm32f427ag.rs +++ b/embassy-stm32/src/pac/stm32f427ag.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f427ai.rs b/embassy-stm32/src/pac/stm32f427ai.rs index 847ddd3e4..5b239485c 100644 --- a/embassy-stm32/src/pac/stm32f427ai.rs +++ b/embassy-stm32/src/pac/stm32f427ai.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f427ig.rs b/embassy-stm32/src/pac/stm32f427ig.rs index 89ad349bb..1f93ac329 100644 --- a/embassy-stm32/src/pac/stm32f427ig.rs +++ b/embassy-stm32/src/pac/stm32f427ig.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f427ii.rs b/embassy-stm32/src/pac/stm32f427ii.rs index 89ad349bb..1f93ac329 100644 --- a/embassy-stm32/src/pac/stm32f427ii.rs +++ b/embassy-stm32/src/pac/stm32f427ii.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f427vg.rs b/embassy-stm32/src/pac/stm32f427vg.rs index 7986a1d21..fc277ee84 100644 --- a/embassy-stm32/src/pac/stm32f427vg.rs +++ b/embassy-stm32/src/pac/stm32f427vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f427vi.rs b/embassy-stm32/src/pac/stm32f427vi.rs index 7986a1d21..fc277ee84 100644 --- a/embassy-stm32/src/pac/stm32f427vi.rs +++ b/embassy-stm32/src/pac/stm32f427vi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f427zg.rs b/embassy-stm32/src/pac/stm32f427zg.rs index 89ad349bb..1f93ac329 100644 --- a/embassy-stm32/src/pac/stm32f427zg.rs +++ b/embassy-stm32/src/pac/stm32f427zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f427zi.rs b/embassy-stm32/src/pac/stm32f427zi.rs index 89ad349bb..1f93ac329 100644 --- a/embassy-stm32/src/pac/stm32f427zi.rs +++ b/embassy-stm32/src/pac/stm32f427zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f429ag.rs b/embassy-stm32/src/pac/stm32f429ag.rs index bc0f1b5ea..3c152fe9d 100644 --- a/embassy-stm32/src/pac/stm32f429ag.rs +++ b/embassy-stm32/src/pac/stm32f429ag.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f429ai.rs b/embassy-stm32/src/pac/stm32f429ai.rs index bc0f1b5ea..3c152fe9d 100644 --- a/embassy-stm32/src/pac/stm32f429ai.rs +++ b/embassy-stm32/src/pac/stm32f429ai.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f429be.rs b/embassy-stm32/src/pac/stm32f429be.rs index 15bbdbb14..ff31c6c56 100644 --- a/embassy-stm32/src/pac/stm32f429be.rs +++ b/embassy-stm32/src/pac/stm32f429be.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f429bg.rs b/embassy-stm32/src/pac/stm32f429bg.rs index 15bbdbb14..ff31c6c56 100644 --- a/embassy-stm32/src/pac/stm32f429bg.rs +++ b/embassy-stm32/src/pac/stm32f429bg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f429bi.rs b/embassy-stm32/src/pac/stm32f429bi.rs index 15bbdbb14..ff31c6c56 100644 --- a/embassy-stm32/src/pac/stm32f429bi.rs +++ b/embassy-stm32/src/pac/stm32f429bi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f429ie.rs b/embassy-stm32/src/pac/stm32f429ie.rs index 15bbdbb14..ff31c6c56 100644 --- a/embassy-stm32/src/pac/stm32f429ie.rs +++ b/embassy-stm32/src/pac/stm32f429ie.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f429ig.rs b/embassy-stm32/src/pac/stm32f429ig.rs index 15bbdbb14..ff31c6c56 100644 --- a/embassy-stm32/src/pac/stm32f429ig.rs +++ b/embassy-stm32/src/pac/stm32f429ig.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f429ii.rs b/embassy-stm32/src/pac/stm32f429ii.rs index 15bbdbb14..ff31c6c56 100644 --- a/embassy-stm32/src/pac/stm32f429ii.rs +++ b/embassy-stm32/src/pac/stm32f429ii.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f429ne.rs b/embassy-stm32/src/pac/stm32f429ne.rs index 15bbdbb14..ff31c6c56 100644 --- a/embassy-stm32/src/pac/stm32f429ne.rs +++ b/embassy-stm32/src/pac/stm32f429ne.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f429ng.rs b/embassy-stm32/src/pac/stm32f429ng.rs index 15bbdbb14..ff31c6c56 100644 --- a/embassy-stm32/src/pac/stm32f429ng.rs +++ b/embassy-stm32/src/pac/stm32f429ng.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f429ni.rs b/embassy-stm32/src/pac/stm32f429ni.rs index 15bbdbb14..ff31c6c56 100644 --- a/embassy-stm32/src/pac/stm32f429ni.rs +++ b/embassy-stm32/src/pac/stm32f429ni.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f429ve.rs b/embassy-stm32/src/pac/stm32f429ve.rs index ab7908d16..a47d2b4f7 100644 --- a/embassy-stm32/src/pac/stm32f429ve.rs +++ b/embassy-stm32/src/pac/stm32f429ve.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f429vg.rs b/embassy-stm32/src/pac/stm32f429vg.rs index ab7908d16..a47d2b4f7 100644 --- a/embassy-stm32/src/pac/stm32f429vg.rs +++ b/embassy-stm32/src/pac/stm32f429vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f429vi.rs b/embassy-stm32/src/pac/stm32f429vi.rs index ab7908d16..a47d2b4f7 100644 --- a/embassy-stm32/src/pac/stm32f429vi.rs +++ b/embassy-stm32/src/pac/stm32f429vi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f429ze.rs b/embassy-stm32/src/pac/stm32f429ze.rs index 15bbdbb14..ff31c6c56 100644 --- a/embassy-stm32/src/pac/stm32f429ze.rs +++ b/embassy-stm32/src/pac/stm32f429ze.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f429zg.rs b/embassy-stm32/src/pac/stm32f429zg.rs index 15bbdbb14..ff31c6c56 100644 --- a/embassy-stm32/src/pac/stm32f429zg.rs +++ b/embassy-stm32/src/pac/stm32f429zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f429zi.rs b/embassy-stm32/src/pac/stm32f429zi.rs index 15bbdbb14..ff31c6c56 100644 --- a/embassy-stm32/src/pac/stm32f429zi.rs +++ b/embassy-stm32/src/pac/stm32f429zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f437ai.rs b/embassy-stm32/src/pac/stm32f437ai.rs index e9f9533f8..7c95ba7a6 100644 --- a/embassy-stm32/src/pac/stm32f437ai.rs +++ b/embassy-stm32/src/pac/stm32f437ai.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f437ig.rs b/embassy-stm32/src/pac/stm32f437ig.rs index ab3111b88..31688d508 100644 --- a/embassy-stm32/src/pac/stm32f437ig.rs +++ b/embassy-stm32/src/pac/stm32f437ig.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f437ii.rs b/embassy-stm32/src/pac/stm32f437ii.rs index ab3111b88..31688d508 100644 --- a/embassy-stm32/src/pac/stm32f437ii.rs +++ b/embassy-stm32/src/pac/stm32f437ii.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f437vg.rs b/embassy-stm32/src/pac/stm32f437vg.rs index 395f3c256..800c6e619 100644 --- a/embassy-stm32/src/pac/stm32f437vg.rs +++ b/embassy-stm32/src/pac/stm32f437vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f437vi.rs b/embassy-stm32/src/pac/stm32f437vi.rs index 395f3c256..800c6e619 100644 --- a/embassy-stm32/src/pac/stm32f437vi.rs +++ b/embassy-stm32/src/pac/stm32f437vi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f437zg.rs b/embassy-stm32/src/pac/stm32f437zg.rs index ab3111b88..31688d508 100644 --- a/embassy-stm32/src/pac/stm32f437zg.rs +++ b/embassy-stm32/src/pac/stm32f437zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f437zi.rs b/embassy-stm32/src/pac/stm32f437zi.rs index ab3111b88..31688d508 100644 --- a/embassy-stm32/src/pac/stm32f437zi.rs +++ b/embassy-stm32/src/pac/stm32f437zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f439ai.rs b/embassy-stm32/src/pac/stm32f439ai.rs index d67721245..10f4cb276 100644 --- a/embassy-stm32/src/pac/stm32f439ai.rs +++ b/embassy-stm32/src/pac/stm32f439ai.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f439bg.rs b/embassy-stm32/src/pac/stm32f439bg.rs index b0d6fa7d8..9d7edc868 100644 --- a/embassy-stm32/src/pac/stm32f439bg.rs +++ b/embassy-stm32/src/pac/stm32f439bg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f439bi.rs b/embassy-stm32/src/pac/stm32f439bi.rs index b0d6fa7d8..9d7edc868 100644 --- a/embassy-stm32/src/pac/stm32f439bi.rs +++ b/embassy-stm32/src/pac/stm32f439bi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f439ig.rs b/embassy-stm32/src/pac/stm32f439ig.rs index b0d6fa7d8..9d7edc868 100644 --- a/embassy-stm32/src/pac/stm32f439ig.rs +++ b/embassy-stm32/src/pac/stm32f439ig.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f439ii.rs b/embassy-stm32/src/pac/stm32f439ii.rs index b0d6fa7d8..9d7edc868 100644 --- a/embassy-stm32/src/pac/stm32f439ii.rs +++ b/embassy-stm32/src/pac/stm32f439ii.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f439ng.rs b/embassy-stm32/src/pac/stm32f439ng.rs index b0d6fa7d8..9d7edc868 100644 --- a/embassy-stm32/src/pac/stm32f439ng.rs +++ b/embassy-stm32/src/pac/stm32f439ng.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f439ni.rs b/embassy-stm32/src/pac/stm32f439ni.rs index b0d6fa7d8..9d7edc868 100644 --- a/embassy-stm32/src/pac/stm32f439ni.rs +++ b/embassy-stm32/src/pac/stm32f439ni.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f439vg.rs b/embassy-stm32/src/pac/stm32f439vg.rs index 037f67b9f..eee391ec6 100644 --- a/embassy-stm32/src/pac/stm32f439vg.rs +++ b/embassy-stm32/src/pac/stm32f439vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f439vi.rs b/embassy-stm32/src/pac/stm32f439vi.rs index 037f67b9f..eee391ec6 100644 --- a/embassy-stm32/src/pac/stm32f439vi.rs +++ b/embassy-stm32/src/pac/stm32f439vi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f439zg.rs b/embassy-stm32/src/pac/stm32f439zg.rs index b0d6fa7d8..9d7edc868 100644 --- a/embassy-stm32/src/pac/stm32f439zg.rs +++ b/embassy-stm32/src/pac/stm32f439zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f439zi.rs b/embassy-stm32/src/pac/stm32f439zi.rs index b0d6fa7d8..9d7edc868 100644 --- a/embassy-stm32/src/pac/stm32f439zi.rs +++ b/embassy-stm32/src/pac/stm32f439zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f446mc.rs b/embassy-stm32/src/pac/stm32f446mc.rs index 9fe1c27c4..4e8597fcf 100644 --- a/embassy-stm32/src/pac/stm32f446mc.rs +++ b/embassy-stm32/src/pac/stm32f446mc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f446me.rs b/embassy-stm32/src/pac/stm32f446me.rs index 9fe1c27c4..4e8597fcf 100644 --- a/embassy-stm32/src/pac/stm32f446me.rs +++ b/embassy-stm32/src/pac/stm32f446me.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f446rc.rs b/embassy-stm32/src/pac/stm32f446rc.rs index 87913b052..64fc1dbba 100644 --- a/embassy-stm32/src/pac/stm32f446rc.rs +++ b/embassy-stm32/src/pac/stm32f446rc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f446re.rs b/embassy-stm32/src/pac/stm32f446re.rs index 87913b052..64fc1dbba 100644 --- a/embassy-stm32/src/pac/stm32f446re.rs +++ b/embassy-stm32/src/pac/stm32f446re.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f446vc.rs b/embassy-stm32/src/pac/stm32f446vc.rs index 9fe1c27c4..4e8597fcf 100644 --- a/embassy-stm32/src/pac/stm32f446vc.rs +++ b/embassy-stm32/src/pac/stm32f446vc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f446ve.rs b/embassy-stm32/src/pac/stm32f446ve.rs index 9fe1c27c4..4e8597fcf 100644 --- a/embassy-stm32/src/pac/stm32f446ve.rs +++ b/embassy-stm32/src/pac/stm32f446ve.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f446zc.rs b/embassy-stm32/src/pac/stm32f446zc.rs index 9fe1c27c4..4e8597fcf 100644 --- a/embassy-stm32/src/pac/stm32f446zc.rs +++ b/embassy-stm32/src/pac/stm32f446zc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f446ze.rs b/embassy-stm32/src/pac/stm32f446ze.rs index 9fe1c27c4..4e8597fcf 100644 --- a/embassy-stm32/src/pac/stm32f446ze.rs +++ b/embassy-stm32/src/pac/stm32f446ze.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f469ae.rs b/embassy-stm32/src/pac/stm32f469ae.rs index d3821cf90..669ceb41b 100644 --- a/embassy-stm32/src/pac/stm32f469ae.rs +++ b/embassy-stm32/src/pac/stm32f469ae.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f469ag.rs b/embassy-stm32/src/pac/stm32f469ag.rs index d3821cf90..669ceb41b 100644 --- a/embassy-stm32/src/pac/stm32f469ag.rs +++ b/embassy-stm32/src/pac/stm32f469ag.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f469ai.rs b/embassy-stm32/src/pac/stm32f469ai.rs index d3821cf90..669ceb41b 100644 --- a/embassy-stm32/src/pac/stm32f469ai.rs +++ b/embassy-stm32/src/pac/stm32f469ai.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f469be.rs b/embassy-stm32/src/pac/stm32f469be.rs index d3821cf90..669ceb41b 100644 --- a/embassy-stm32/src/pac/stm32f469be.rs +++ b/embassy-stm32/src/pac/stm32f469be.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f469bg.rs b/embassy-stm32/src/pac/stm32f469bg.rs index d3821cf90..669ceb41b 100644 --- a/embassy-stm32/src/pac/stm32f469bg.rs +++ b/embassy-stm32/src/pac/stm32f469bg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f469bi.rs b/embassy-stm32/src/pac/stm32f469bi.rs index d3821cf90..669ceb41b 100644 --- a/embassy-stm32/src/pac/stm32f469bi.rs +++ b/embassy-stm32/src/pac/stm32f469bi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f469ie.rs b/embassy-stm32/src/pac/stm32f469ie.rs index d3821cf90..669ceb41b 100644 --- a/embassy-stm32/src/pac/stm32f469ie.rs +++ b/embassy-stm32/src/pac/stm32f469ie.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f469ig.rs b/embassy-stm32/src/pac/stm32f469ig.rs index d3821cf90..669ceb41b 100644 --- a/embassy-stm32/src/pac/stm32f469ig.rs +++ b/embassy-stm32/src/pac/stm32f469ig.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f469ii.rs b/embassy-stm32/src/pac/stm32f469ii.rs index d3821cf90..669ceb41b 100644 --- a/embassy-stm32/src/pac/stm32f469ii.rs +++ b/embassy-stm32/src/pac/stm32f469ii.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f469ne.rs b/embassy-stm32/src/pac/stm32f469ne.rs index d3821cf90..669ceb41b 100644 --- a/embassy-stm32/src/pac/stm32f469ne.rs +++ b/embassy-stm32/src/pac/stm32f469ne.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f469ng.rs b/embassy-stm32/src/pac/stm32f469ng.rs index d3821cf90..669ceb41b 100644 --- a/embassy-stm32/src/pac/stm32f469ng.rs +++ b/embassy-stm32/src/pac/stm32f469ng.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f469ni.rs b/embassy-stm32/src/pac/stm32f469ni.rs index d3821cf90..669ceb41b 100644 --- a/embassy-stm32/src/pac/stm32f469ni.rs +++ b/embassy-stm32/src/pac/stm32f469ni.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f469ve.rs b/embassy-stm32/src/pac/stm32f469ve.rs index d3821cf90..669ceb41b 100644 --- a/embassy-stm32/src/pac/stm32f469ve.rs +++ b/embassy-stm32/src/pac/stm32f469ve.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f469vg.rs b/embassy-stm32/src/pac/stm32f469vg.rs index d3821cf90..669ceb41b 100644 --- a/embassy-stm32/src/pac/stm32f469vg.rs +++ b/embassy-stm32/src/pac/stm32f469vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f469vi.rs b/embassy-stm32/src/pac/stm32f469vi.rs index d3821cf90..669ceb41b 100644 --- a/embassy-stm32/src/pac/stm32f469vi.rs +++ b/embassy-stm32/src/pac/stm32f469vi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f469ze.rs b/embassy-stm32/src/pac/stm32f469ze.rs index d3821cf90..669ceb41b 100644 --- a/embassy-stm32/src/pac/stm32f469ze.rs +++ b/embassy-stm32/src/pac/stm32f469ze.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f469zg.rs b/embassy-stm32/src/pac/stm32f469zg.rs index d3821cf90..669ceb41b 100644 --- a/embassy-stm32/src/pac/stm32f469zg.rs +++ b/embassy-stm32/src/pac/stm32f469zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f469zi.rs b/embassy-stm32/src/pac/stm32f469zi.rs index d3821cf90..669ceb41b 100644 --- a/embassy-stm32/src/pac/stm32f469zi.rs +++ b/embassy-stm32/src/pac/stm32f469zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f479ag.rs b/embassy-stm32/src/pac/stm32f479ag.rs index 21c5647de..59df72c2b 100644 --- a/embassy-stm32/src/pac/stm32f479ag.rs +++ b/embassy-stm32/src/pac/stm32f479ag.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f479ai.rs b/embassy-stm32/src/pac/stm32f479ai.rs index 21c5647de..59df72c2b 100644 --- a/embassy-stm32/src/pac/stm32f479ai.rs +++ b/embassy-stm32/src/pac/stm32f479ai.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f479bg.rs b/embassy-stm32/src/pac/stm32f479bg.rs index 21c5647de..59df72c2b 100644 --- a/embassy-stm32/src/pac/stm32f479bg.rs +++ b/embassy-stm32/src/pac/stm32f479bg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f479bi.rs b/embassy-stm32/src/pac/stm32f479bi.rs index 21c5647de..59df72c2b 100644 --- a/embassy-stm32/src/pac/stm32f479bi.rs +++ b/embassy-stm32/src/pac/stm32f479bi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f479ig.rs b/embassy-stm32/src/pac/stm32f479ig.rs index 21c5647de..59df72c2b 100644 --- a/embassy-stm32/src/pac/stm32f479ig.rs +++ b/embassy-stm32/src/pac/stm32f479ig.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f479ii.rs b/embassy-stm32/src/pac/stm32f479ii.rs index 21c5647de..59df72c2b 100644 --- a/embassy-stm32/src/pac/stm32f479ii.rs +++ b/embassy-stm32/src/pac/stm32f479ii.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f479ng.rs b/embassy-stm32/src/pac/stm32f479ng.rs index 21c5647de..59df72c2b 100644 --- a/embassy-stm32/src/pac/stm32f479ng.rs +++ b/embassy-stm32/src/pac/stm32f479ng.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f479ni.rs b/embassy-stm32/src/pac/stm32f479ni.rs index 21c5647de..59df72c2b 100644 --- a/embassy-stm32/src/pac/stm32f479ni.rs +++ b/embassy-stm32/src/pac/stm32f479ni.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f479vg.rs b/embassy-stm32/src/pac/stm32f479vg.rs index 21c5647de..59df72c2b 100644 --- a/embassy-stm32/src/pac/stm32f479vg.rs +++ b/embassy-stm32/src/pac/stm32f479vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f479vi.rs b/embassy-stm32/src/pac/stm32f479vi.rs index 21c5647de..59df72c2b 100644 --- a/embassy-stm32/src/pac/stm32f479vi.rs +++ b/embassy-stm32/src/pac/stm32f479vi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f479zg.rs b/embassy-stm32/src/pac/stm32f479zg.rs index 21c5647de..59df72c2b 100644 --- a/embassy-stm32/src/pac/stm32f479zg.rs +++ b/embassy-stm32/src/pac/stm32f479zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32f479zi.rs b/embassy-stm32/src/pac/stm32f479zi.rs index 21c5647de..59df72c2b 100644 --- a/embassy-stm32/src/pac/stm32f479zi.rs +++ b/embassy-stm32/src/pac/stm32f479zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x40020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40026000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40026400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40013c00 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x40020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h723ve.rs b/embassy-stm32/src/pac/stm32h723ve.rs index d8f59a68e..aedcde8e5 100644 --- a/embassy-stm32/src/pac/stm32h723ve.rs +++ b/embassy-stm32/src/pac/stm32h723ve.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h723vg.rs b/embassy-stm32/src/pac/stm32h723vg.rs index d8f59a68e..aedcde8e5 100644 --- a/embassy-stm32/src/pac/stm32h723vg.rs +++ b/embassy-stm32/src/pac/stm32h723vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h723ze.rs b/embassy-stm32/src/pac/stm32h723ze.rs index d8f59a68e..aedcde8e5 100644 --- a/embassy-stm32/src/pac/stm32h723ze.rs +++ b/embassy-stm32/src/pac/stm32h723ze.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h723zg.rs b/embassy-stm32/src/pac/stm32h723zg.rs index d8f59a68e..aedcde8e5 100644 --- a/embassy-stm32/src/pac/stm32h723zg.rs +++ b/embassy-stm32/src/pac/stm32h723zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h725ae.rs b/embassy-stm32/src/pac/stm32h725ae.rs index d8f59a68e..aedcde8e5 100644 --- a/embassy-stm32/src/pac/stm32h725ae.rs +++ b/embassy-stm32/src/pac/stm32h725ae.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h725ag.rs b/embassy-stm32/src/pac/stm32h725ag.rs index d8f59a68e..aedcde8e5 100644 --- a/embassy-stm32/src/pac/stm32h725ag.rs +++ b/embassy-stm32/src/pac/stm32h725ag.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h725ie.rs b/embassy-stm32/src/pac/stm32h725ie.rs index d8f59a68e..aedcde8e5 100644 --- a/embassy-stm32/src/pac/stm32h725ie.rs +++ b/embassy-stm32/src/pac/stm32h725ie.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h725ig.rs b/embassy-stm32/src/pac/stm32h725ig.rs index d8f59a68e..aedcde8e5 100644 --- a/embassy-stm32/src/pac/stm32h725ig.rs +++ b/embassy-stm32/src/pac/stm32h725ig.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h725re.rs b/embassy-stm32/src/pac/stm32h725re.rs index d8f59a68e..aedcde8e5 100644 --- a/embassy-stm32/src/pac/stm32h725re.rs +++ b/embassy-stm32/src/pac/stm32h725re.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h725rg.rs b/embassy-stm32/src/pac/stm32h725rg.rs index d8f59a68e..aedcde8e5 100644 --- a/embassy-stm32/src/pac/stm32h725rg.rs +++ b/embassy-stm32/src/pac/stm32h725rg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h725ve.rs b/embassy-stm32/src/pac/stm32h725ve.rs index d8f59a68e..aedcde8e5 100644 --- a/embassy-stm32/src/pac/stm32h725ve.rs +++ b/embassy-stm32/src/pac/stm32h725ve.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h725vg.rs b/embassy-stm32/src/pac/stm32h725vg.rs index d8f59a68e..aedcde8e5 100644 --- a/embassy-stm32/src/pac/stm32h725vg.rs +++ b/embassy-stm32/src/pac/stm32h725vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h725ze.rs b/embassy-stm32/src/pac/stm32h725ze.rs index d8f59a68e..aedcde8e5 100644 --- a/embassy-stm32/src/pac/stm32h725ze.rs +++ b/embassy-stm32/src/pac/stm32h725ze.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h725zg.rs b/embassy-stm32/src/pac/stm32h725zg.rs index d8f59a68e..aedcde8e5 100644 --- a/embassy-stm32/src/pac/stm32h725zg.rs +++ b/embassy-stm32/src/pac/stm32h725zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h730ab.rs b/embassy-stm32/src/pac/stm32h730ab.rs index f6a5cc00e..589a1fd07 100644 --- a/embassy-stm32/src/pac/stm32h730ab.rs +++ b/embassy-stm32/src/pac/stm32h730ab.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h730ib.rs b/embassy-stm32/src/pac/stm32h730ib.rs index f6a5cc00e..589a1fd07 100644 --- a/embassy-stm32/src/pac/stm32h730ib.rs +++ b/embassy-stm32/src/pac/stm32h730ib.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h730vb.rs b/embassy-stm32/src/pac/stm32h730vb.rs index f6a5cc00e..589a1fd07 100644 --- a/embassy-stm32/src/pac/stm32h730vb.rs +++ b/embassy-stm32/src/pac/stm32h730vb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h730zb.rs b/embassy-stm32/src/pac/stm32h730zb.rs index f6a5cc00e..589a1fd07 100644 --- a/embassy-stm32/src/pac/stm32h730zb.rs +++ b/embassy-stm32/src/pac/stm32h730zb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h733vg.rs b/embassy-stm32/src/pac/stm32h733vg.rs index f6a5cc00e..589a1fd07 100644 --- a/embassy-stm32/src/pac/stm32h733vg.rs +++ b/embassy-stm32/src/pac/stm32h733vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h733zg.rs b/embassy-stm32/src/pac/stm32h733zg.rs index f6a5cc00e..589a1fd07 100644 --- a/embassy-stm32/src/pac/stm32h733zg.rs +++ b/embassy-stm32/src/pac/stm32h733zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h735ag.rs b/embassy-stm32/src/pac/stm32h735ag.rs index f6a5cc00e..589a1fd07 100644 --- a/embassy-stm32/src/pac/stm32h735ag.rs +++ b/embassy-stm32/src/pac/stm32h735ag.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h735ig.rs b/embassy-stm32/src/pac/stm32h735ig.rs index f6a5cc00e..589a1fd07 100644 --- a/embassy-stm32/src/pac/stm32h735ig.rs +++ b/embassy-stm32/src/pac/stm32h735ig.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h735rg.rs b/embassy-stm32/src/pac/stm32h735rg.rs index f6a5cc00e..589a1fd07 100644 --- a/embassy-stm32/src/pac/stm32h735rg.rs +++ b/embassy-stm32/src/pac/stm32h735rg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h735vg.rs b/embassy-stm32/src/pac/stm32h735vg.rs index f6a5cc00e..589a1fd07 100644 --- a/embassy-stm32/src/pac/stm32h735vg.rs +++ b/embassy-stm32/src/pac/stm32h735vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h735zg.rs b/embassy-stm32/src/pac/stm32h735zg.rs index f6a5cc00e..589a1fd07 100644 --- a/embassy-stm32/src/pac/stm32h735zg.rs +++ b/embassy-stm32/src/pac/stm32h735zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h742ag.rs b/embassy-stm32/src/pac/stm32h742ag.rs index cf23787d3..6277a595f 100644 --- a/embassy-stm32/src/pac/stm32h742ag.rs +++ b/embassy-stm32/src/pac/stm32h742ag.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h742ai.rs b/embassy-stm32/src/pac/stm32h742ai.rs index cf23787d3..6277a595f 100644 --- a/embassy-stm32/src/pac/stm32h742ai.rs +++ b/embassy-stm32/src/pac/stm32h742ai.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h742bg.rs b/embassy-stm32/src/pac/stm32h742bg.rs index cf23787d3..6277a595f 100644 --- a/embassy-stm32/src/pac/stm32h742bg.rs +++ b/embassy-stm32/src/pac/stm32h742bg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h742bi.rs b/embassy-stm32/src/pac/stm32h742bi.rs index cf23787d3..6277a595f 100644 --- a/embassy-stm32/src/pac/stm32h742bi.rs +++ b/embassy-stm32/src/pac/stm32h742bi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h742ig.rs b/embassy-stm32/src/pac/stm32h742ig.rs index cf23787d3..6277a595f 100644 --- a/embassy-stm32/src/pac/stm32h742ig.rs +++ b/embassy-stm32/src/pac/stm32h742ig.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h742ii.rs b/embassy-stm32/src/pac/stm32h742ii.rs index cf23787d3..6277a595f 100644 --- a/embassy-stm32/src/pac/stm32h742ii.rs +++ b/embassy-stm32/src/pac/stm32h742ii.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h742vg.rs b/embassy-stm32/src/pac/stm32h742vg.rs index cf23787d3..6277a595f 100644 --- a/embassy-stm32/src/pac/stm32h742vg.rs +++ b/embassy-stm32/src/pac/stm32h742vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h742vi.rs b/embassy-stm32/src/pac/stm32h742vi.rs index cf23787d3..6277a595f 100644 --- a/embassy-stm32/src/pac/stm32h742vi.rs +++ b/embassy-stm32/src/pac/stm32h742vi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h742xg.rs b/embassy-stm32/src/pac/stm32h742xg.rs index cf23787d3..6277a595f 100644 --- a/embassy-stm32/src/pac/stm32h742xg.rs +++ b/embassy-stm32/src/pac/stm32h742xg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h742xi.rs b/embassy-stm32/src/pac/stm32h742xi.rs index cf23787d3..6277a595f 100644 --- a/embassy-stm32/src/pac/stm32h742xi.rs +++ b/embassy-stm32/src/pac/stm32h742xi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h742zg.rs b/embassy-stm32/src/pac/stm32h742zg.rs index cf23787d3..6277a595f 100644 --- a/embassy-stm32/src/pac/stm32h742zg.rs +++ b/embassy-stm32/src/pac/stm32h742zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h742zi.rs b/embassy-stm32/src/pac/stm32h742zi.rs index cf23787d3..6277a595f 100644 --- a/embassy-stm32/src/pac/stm32h742zi.rs +++ b/embassy-stm32/src/pac/stm32h742zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h743ag.rs b/embassy-stm32/src/pac/stm32h743ag.rs index d9dd3deff..47e811b48 100644 --- a/embassy-stm32/src/pac/stm32h743ag.rs +++ b/embassy-stm32/src/pac/stm32h743ag.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h743ai.rs b/embassy-stm32/src/pac/stm32h743ai.rs index d9dd3deff..47e811b48 100644 --- a/embassy-stm32/src/pac/stm32h743ai.rs +++ b/embassy-stm32/src/pac/stm32h743ai.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h743bg.rs b/embassy-stm32/src/pac/stm32h743bg.rs index d9dd3deff..47e811b48 100644 --- a/embassy-stm32/src/pac/stm32h743bg.rs +++ b/embassy-stm32/src/pac/stm32h743bg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h743bi.rs b/embassy-stm32/src/pac/stm32h743bi.rs index d9dd3deff..47e811b48 100644 --- a/embassy-stm32/src/pac/stm32h743bi.rs +++ b/embassy-stm32/src/pac/stm32h743bi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h743ig.rs b/embassy-stm32/src/pac/stm32h743ig.rs index d9dd3deff..47e811b48 100644 --- a/embassy-stm32/src/pac/stm32h743ig.rs +++ b/embassy-stm32/src/pac/stm32h743ig.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h743ii.rs b/embassy-stm32/src/pac/stm32h743ii.rs index d9dd3deff..47e811b48 100644 --- a/embassy-stm32/src/pac/stm32h743ii.rs +++ b/embassy-stm32/src/pac/stm32h743ii.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h743vg.rs b/embassy-stm32/src/pac/stm32h743vg.rs index d9dd3deff..47e811b48 100644 --- a/embassy-stm32/src/pac/stm32h743vg.rs +++ b/embassy-stm32/src/pac/stm32h743vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h743vi.rs b/embassy-stm32/src/pac/stm32h743vi.rs index d9dd3deff..47e811b48 100644 --- a/embassy-stm32/src/pac/stm32h743vi.rs +++ b/embassy-stm32/src/pac/stm32h743vi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h743xg.rs b/embassy-stm32/src/pac/stm32h743xg.rs index d9dd3deff..47e811b48 100644 --- a/embassy-stm32/src/pac/stm32h743xg.rs +++ b/embassy-stm32/src/pac/stm32h743xg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h743xi.rs b/embassy-stm32/src/pac/stm32h743xi.rs index d9dd3deff..47e811b48 100644 --- a/embassy-stm32/src/pac/stm32h743xi.rs +++ b/embassy-stm32/src/pac/stm32h743xi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h743zg.rs b/embassy-stm32/src/pac/stm32h743zg.rs index d9dd3deff..47e811b48 100644 --- a/embassy-stm32/src/pac/stm32h743zg.rs +++ b/embassy-stm32/src/pac/stm32h743zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h743zi.rs b/embassy-stm32/src/pac/stm32h743zi.rs index d9dd3deff..47e811b48 100644 --- a/embassy-stm32/src/pac/stm32h743zi.rs +++ b/embassy-stm32/src/pac/stm32h743zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h745bg.rs b/embassy-stm32/src/pac/stm32h745bg.rs index 2133cfaf9..3a92848f5 100644 --- a/embassy-stm32/src/pac/stm32h745bg.rs +++ b/embassy-stm32/src/pac/stm32h745bg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h745bi.rs b/embassy-stm32/src/pac/stm32h745bi.rs index 2133cfaf9..3a92848f5 100644 --- a/embassy-stm32/src/pac/stm32h745bi.rs +++ b/embassy-stm32/src/pac/stm32h745bi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h745ig.rs b/embassy-stm32/src/pac/stm32h745ig.rs index 2133cfaf9..3a92848f5 100644 --- a/embassy-stm32/src/pac/stm32h745ig.rs +++ b/embassy-stm32/src/pac/stm32h745ig.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h745ii.rs b/embassy-stm32/src/pac/stm32h745ii.rs index 2133cfaf9..3a92848f5 100644 --- a/embassy-stm32/src/pac/stm32h745ii.rs +++ b/embassy-stm32/src/pac/stm32h745ii.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h745xg.rs b/embassy-stm32/src/pac/stm32h745xg.rs index 2133cfaf9..3a92848f5 100644 --- a/embassy-stm32/src/pac/stm32h745xg.rs +++ b/embassy-stm32/src/pac/stm32h745xg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h745xi.rs b/embassy-stm32/src/pac/stm32h745xi.rs index 2133cfaf9..3a92848f5 100644 --- a/embassy-stm32/src/pac/stm32h745xi.rs +++ b/embassy-stm32/src/pac/stm32h745xi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h745zg.rs b/embassy-stm32/src/pac/stm32h745zg.rs index 2133cfaf9..3a92848f5 100644 --- a/embassy-stm32/src/pac/stm32h745zg.rs +++ b/embassy-stm32/src/pac/stm32h745zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h745zi.rs b/embassy-stm32/src/pac/stm32h745zi.rs index 2133cfaf9..3a92848f5 100644 --- a/embassy-stm32/src/pac/stm32h745zi.rs +++ b/embassy-stm32/src/pac/stm32h745zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h747ag.rs b/embassy-stm32/src/pac/stm32h747ag.rs index 04ba7f390..ade3d41dd 100644 --- a/embassy-stm32/src/pac/stm32h747ag.rs +++ b/embassy-stm32/src/pac/stm32h747ag.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h747ai.rs b/embassy-stm32/src/pac/stm32h747ai.rs index 04ba7f390..ade3d41dd 100644 --- a/embassy-stm32/src/pac/stm32h747ai.rs +++ b/embassy-stm32/src/pac/stm32h747ai.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h747bg.rs b/embassy-stm32/src/pac/stm32h747bg.rs index 04ba7f390..ade3d41dd 100644 --- a/embassy-stm32/src/pac/stm32h747bg.rs +++ b/embassy-stm32/src/pac/stm32h747bg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h747bi.rs b/embassy-stm32/src/pac/stm32h747bi.rs index 04ba7f390..ade3d41dd 100644 --- a/embassy-stm32/src/pac/stm32h747bi.rs +++ b/embassy-stm32/src/pac/stm32h747bi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h747ig.rs b/embassy-stm32/src/pac/stm32h747ig.rs index 04ba7f390..ade3d41dd 100644 --- a/embassy-stm32/src/pac/stm32h747ig.rs +++ b/embassy-stm32/src/pac/stm32h747ig.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h747ii.rs b/embassy-stm32/src/pac/stm32h747ii.rs index 04ba7f390..ade3d41dd 100644 --- a/embassy-stm32/src/pac/stm32h747ii.rs +++ b/embassy-stm32/src/pac/stm32h747ii.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h747xg.rs b/embassy-stm32/src/pac/stm32h747xg.rs index 04ba7f390..ade3d41dd 100644 --- a/embassy-stm32/src/pac/stm32h747xg.rs +++ b/embassy-stm32/src/pac/stm32h747xg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h747xi.rs b/embassy-stm32/src/pac/stm32h747xi.rs index 04ba7f390..ade3d41dd 100644 --- a/embassy-stm32/src/pac/stm32h747xi.rs +++ b/embassy-stm32/src/pac/stm32h747xi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h747zi.rs b/embassy-stm32/src/pac/stm32h747zi.rs index 04ba7f390..ade3d41dd 100644 --- a/embassy-stm32/src/pac/stm32h747zi.rs +++ b/embassy-stm32/src/pac/stm32h747zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h750ib.rs b/embassy-stm32/src/pac/stm32h750ib.rs index d17f766e9..cfaf3608c 100644 --- a/embassy-stm32/src/pac/stm32h750ib.rs +++ b/embassy-stm32/src/pac/stm32h750ib.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h750vb.rs b/embassy-stm32/src/pac/stm32h750vb.rs index d17f766e9..cfaf3608c 100644 --- a/embassy-stm32/src/pac/stm32h750vb.rs +++ b/embassy-stm32/src/pac/stm32h750vb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h750xb.rs b/embassy-stm32/src/pac/stm32h750xb.rs index d17f766e9..cfaf3608c 100644 --- a/embassy-stm32/src/pac/stm32h750xb.rs +++ b/embassy-stm32/src/pac/stm32h750xb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h750zb.rs b/embassy-stm32/src/pac/stm32h750zb.rs index d17f766e9..cfaf3608c 100644 --- a/embassy-stm32/src/pac/stm32h750zb.rs +++ b/embassy-stm32/src/pac/stm32h750zb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h753ai.rs b/embassy-stm32/src/pac/stm32h753ai.rs index d17f766e9..cfaf3608c 100644 --- a/embassy-stm32/src/pac/stm32h753ai.rs +++ b/embassy-stm32/src/pac/stm32h753ai.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h753bi.rs b/embassy-stm32/src/pac/stm32h753bi.rs index d17f766e9..cfaf3608c 100644 --- a/embassy-stm32/src/pac/stm32h753bi.rs +++ b/embassy-stm32/src/pac/stm32h753bi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h753ii.rs b/embassy-stm32/src/pac/stm32h753ii.rs index d17f766e9..cfaf3608c 100644 --- a/embassy-stm32/src/pac/stm32h753ii.rs +++ b/embassy-stm32/src/pac/stm32h753ii.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h753vi.rs b/embassy-stm32/src/pac/stm32h753vi.rs index d17f766e9..cfaf3608c 100644 --- a/embassy-stm32/src/pac/stm32h753vi.rs +++ b/embassy-stm32/src/pac/stm32h753vi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h753xi.rs b/embassy-stm32/src/pac/stm32h753xi.rs index d17f766e9..cfaf3608c 100644 --- a/embassy-stm32/src/pac/stm32h753xi.rs +++ b/embassy-stm32/src/pac/stm32h753xi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h753zi.rs b/embassy-stm32/src/pac/stm32h753zi.rs index d17f766e9..cfaf3608c 100644 --- a/embassy-stm32/src/pac/stm32h753zi.rs +++ b/embassy-stm32/src/pac/stm32h753zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h755bi.rs b/embassy-stm32/src/pac/stm32h755bi.rs index a7c55f046..673440d22 100644 --- a/embassy-stm32/src/pac/stm32h755bi.rs +++ b/embassy-stm32/src/pac/stm32h755bi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h755ii.rs b/embassy-stm32/src/pac/stm32h755ii.rs index a7c55f046..673440d22 100644 --- a/embassy-stm32/src/pac/stm32h755ii.rs +++ b/embassy-stm32/src/pac/stm32h755ii.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h755xi.rs b/embassy-stm32/src/pac/stm32h755xi.rs index a7c55f046..673440d22 100644 --- a/embassy-stm32/src/pac/stm32h755xi.rs +++ b/embassy-stm32/src/pac/stm32h755xi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h755zi.rs b/embassy-stm32/src/pac/stm32h755zi.rs index a7c55f046..673440d22 100644 --- a/embassy-stm32/src/pac/stm32h755zi.rs +++ b/embassy-stm32/src/pac/stm32h755zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h757ai.rs b/embassy-stm32/src/pac/stm32h757ai.rs index 3a139b290..66057ae06 100644 --- a/embassy-stm32/src/pac/stm32h757ai.rs +++ b/embassy-stm32/src/pac/stm32h757ai.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h757bi.rs b/embassy-stm32/src/pac/stm32h757bi.rs index 3a139b290..66057ae06 100644 --- a/embassy-stm32/src/pac/stm32h757bi.rs +++ b/embassy-stm32/src/pac/stm32h757bi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h757ii.rs b/embassy-stm32/src/pac/stm32h757ii.rs index 3a139b290..66057ae06 100644 --- a/embassy-stm32/src/pac/stm32h757ii.rs +++ b/embassy-stm32/src/pac/stm32h757ii.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h757xi.rs b/embassy-stm32/src/pac/stm32h757xi.rs index 3a139b290..66057ae06 100644 --- a/embassy-stm32/src/pac/stm32h757xi.rs +++ b/embassy-stm32/src/pac/stm32h757xi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h757zi.rs b/embassy-stm32/src/pac/stm32h757zi.rs index 3a139b290..66057ae06 100644 --- a/embassy-stm32/src/pac/stm32h757zi.rs +++ b/embassy-stm32/src/pac/stm32h757zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7a3ag.rs b/embassy-stm32/src/pac/stm32h7a3ag.rs index 60ff28138..cc3b10a98 100644 --- a/embassy-stm32/src/pac/stm32h7a3ag.rs +++ b/embassy-stm32/src/pac/stm32h7a3ag.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7a3ai.rs b/embassy-stm32/src/pac/stm32h7a3ai.rs index 60ff28138..cc3b10a98 100644 --- a/embassy-stm32/src/pac/stm32h7a3ai.rs +++ b/embassy-stm32/src/pac/stm32h7a3ai.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7a3ig.rs b/embassy-stm32/src/pac/stm32h7a3ig.rs index 60ff28138..cc3b10a98 100644 --- a/embassy-stm32/src/pac/stm32h7a3ig.rs +++ b/embassy-stm32/src/pac/stm32h7a3ig.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7a3ii.rs b/embassy-stm32/src/pac/stm32h7a3ii.rs index 60ff28138..cc3b10a98 100644 --- a/embassy-stm32/src/pac/stm32h7a3ii.rs +++ b/embassy-stm32/src/pac/stm32h7a3ii.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7a3lg.rs b/embassy-stm32/src/pac/stm32h7a3lg.rs index 60ff28138..cc3b10a98 100644 --- a/embassy-stm32/src/pac/stm32h7a3lg.rs +++ b/embassy-stm32/src/pac/stm32h7a3lg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7a3li.rs b/embassy-stm32/src/pac/stm32h7a3li.rs index 60ff28138..cc3b10a98 100644 --- a/embassy-stm32/src/pac/stm32h7a3li.rs +++ b/embassy-stm32/src/pac/stm32h7a3li.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7a3ng.rs b/embassy-stm32/src/pac/stm32h7a3ng.rs index 60ff28138..cc3b10a98 100644 --- a/embassy-stm32/src/pac/stm32h7a3ng.rs +++ b/embassy-stm32/src/pac/stm32h7a3ng.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7a3ni.rs b/embassy-stm32/src/pac/stm32h7a3ni.rs index 60ff28138..cc3b10a98 100644 --- a/embassy-stm32/src/pac/stm32h7a3ni.rs +++ b/embassy-stm32/src/pac/stm32h7a3ni.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7a3qi.rs b/embassy-stm32/src/pac/stm32h7a3qi.rs index 60ff28138..cc3b10a98 100644 --- a/embassy-stm32/src/pac/stm32h7a3qi.rs +++ b/embassy-stm32/src/pac/stm32h7a3qi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7a3rg.rs b/embassy-stm32/src/pac/stm32h7a3rg.rs index 60ff28138..cc3b10a98 100644 --- a/embassy-stm32/src/pac/stm32h7a3rg.rs +++ b/embassy-stm32/src/pac/stm32h7a3rg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7a3ri.rs b/embassy-stm32/src/pac/stm32h7a3ri.rs index 60ff28138..cc3b10a98 100644 --- a/embassy-stm32/src/pac/stm32h7a3ri.rs +++ b/embassy-stm32/src/pac/stm32h7a3ri.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7a3vg.rs b/embassy-stm32/src/pac/stm32h7a3vg.rs index 60ff28138..cc3b10a98 100644 --- a/embassy-stm32/src/pac/stm32h7a3vg.rs +++ b/embassy-stm32/src/pac/stm32h7a3vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7a3vi.rs b/embassy-stm32/src/pac/stm32h7a3vi.rs index 60ff28138..cc3b10a98 100644 --- a/embassy-stm32/src/pac/stm32h7a3vi.rs +++ b/embassy-stm32/src/pac/stm32h7a3vi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7a3zg.rs b/embassy-stm32/src/pac/stm32h7a3zg.rs index 60ff28138..cc3b10a98 100644 --- a/embassy-stm32/src/pac/stm32h7a3zg.rs +++ b/embassy-stm32/src/pac/stm32h7a3zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7a3zi.rs b/embassy-stm32/src/pac/stm32h7a3zi.rs index 60ff28138..cc3b10a98 100644 --- a/embassy-stm32/src/pac/stm32h7a3zi.rs +++ b/embassy-stm32/src/pac/stm32h7a3zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7b0ab.rs b/embassy-stm32/src/pac/stm32h7b0ab.rs index a9ef1385e..cba2c71b0 100644 --- a/embassy-stm32/src/pac/stm32h7b0ab.rs +++ b/embassy-stm32/src/pac/stm32h7b0ab.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7b0ib.rs b/embassy-stm32/src/pac/stm32h7b0ib.rs index a9ef1385e..cba2c71b0 100644 --- a/embassy-stm32/src/pac/stm32h7b0ib.rs +++ b/embassy-stm32/src/pac/stm32h7b0ib.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7b0rb.rs b/embassy-stm32/src/pac/stm32h7b0rb.rs index a9ef1385e..cba2c71b0 100644 --- a/embassy-stm32/src/pac/stm32h7b0rb.rs +++ b/embassy-stm32/src/pac/stm32h7b0rb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7b0vb.rs b/embassy-stm32/src/pac/stm32h7b0vb.rs index a9ef1385e..cba2c71b0 100644 --- a/embassy-stm32/src/pac/stm32h7b0vb.rs +++ b/embassy-stm32/src/pac/stm32h7b0vb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7b0zb.rs b/embassy-stm32/src/pac/stm32h7b0zb.rs index a9ef1385e..cba2c71b0 100644 --- a/embassy-stm32/src/pac/stm32h7b0zb.rs +++ b/embassy-stm32/src/pac/stm32h7b0zb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7b3ai.rs b/embassy-stm32/src/pac/stm32h7b3ai.rs index a9ef1385e..cba2c71b0 100644 --- a/embassy-stm32/src/pac/stm32h7b3ai.rs +++ b/embassy-stm32/src/pac/stm32h7b3ai.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7b3ii.rs b/embassy-stm32/src/pac/stm32h7b3ii.rs index a9ef1385e..cba2c71b0 100644 --- a/embassy-stm32/src/pac/stm32h7b3ii.rs +++ b/embassy-stm32/src/pac/stm32h7b3ii.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7b3li.rs b/embassy-stm32/src/pac/stm32h7b3li.rs index a9ef1385e..cba2c71b0 100644 --- a/embassy-stm32/src/pac/stm32h7b3li.rs +++ b/embassy-stm32/src/pac/stm32h7b3li.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7b3ni.rs b/embassy-stm32/src/pac/stm32h7b3ni.rs index a9ef1385e..cba2c71b0 100644 --- a/embassy-stm32/src/pac/stm32h7b3ni.rs +++ b/embassy-stm32/src/pac/stm32h7b3ni.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7b3qi.rs b/embassy-stm32/src/pac/stm32h7b3qi.rs index a9ef1385e..cba2c71b0 100644 --- a/embassy-stm32/src/pac/stm32h7b3qi.rs +++ b/embassy-stm32/src/pac/stm32h7b3qi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7b3ri.rs b/embassy-stm32/src/pac/stm32h7b3ri.rs index a9ef1385e..cba2c71b0 100644 --- a/embassy-stm32/src/pac/stm32h7b3ri.rs +++ b/embassy-stm32/src/pac/stm32h7b3ri.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7b3vi.rs b/embassy-stm32/src/pac/stm32h7b3vi.rs index a9ef1385e..cba2c71b0 100644 --- a/embassy-stm32/src/pac/stm32h7b3vi.rs +++ b/embassy-stm32/src/pac/stm32h7b3vi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32h7b3zi.rs b/embassy-stm32/src/pac/stm32h7b3zi.rs index a9ef1385e..cba2c71b0 100644 --- a/embassy-stm32/src/pac/stm32h7b3zi.rs +++ b/embassy-stm32/src/pac/stm32h7b3zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x58020000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x58000000 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x58020000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l412c8.rs b/embassy-stm32/src/pac/stm32l412c8.rs index 10967834b..375c6c33b 100644 --- a/embassy-stm32/src/pac/stm32l412c8.rs +++ b/embassy-stm32/src/pac/stm32l412c8.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l412cb.rs b/embassy-stm32/src/pac/stm32l412cb.rs index 10967834b..375c6c33b 100644 --- a/embassy-stm32/src/pac/stm32l412cb.rs +++ b/embassy-stm32/src/pac/stm32l412cb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l412k8.rs b/embassy-stm32/src/pac/stm32l412k8.rs index 1954ee899..fda1af224 100644 --- a/embassy-stm32/src/pac/stm32l412k8.rs +++ b/embassy-stm32/src/pac/stm32l412k8.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l412kb.rs b/embassy-stm32/src/pac/stm32l412kb.rs index 1954ee899..fda1af224 100644 --- a/embassy-stm32/src/pac/stm32l412kb.rs +++ b/embassy-stm32/src/pac/stm32l412kb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l412r8.rs b/embassy-stm32/src/pac/stm32l412r8.rs index 10967834b..375c6c33b 100644 --- a/embassy-stm32/src/pac/stm32l412r8.rs +++ b/embassy-stm32/src/pac/stm32l412r8.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l412rb.rs b/embassy-stm32/src/pac/stm32l412rb.rs index 10967834b..375c6c33b 100644 --- a/embassy-stm32/src/pac/stm32l412rb.rs +++ b/embassy-stm32/src/pac/stm32l412rb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l412t8.rs b/embassy-stm32/src/pac/stm32l412t8.rs index 1954ee899..fda1af224 100644 --- a/embassy-stm32/src/pac/stm32l412t8.rs +++ b/embassy-stm32/src/pac/stm32l412t8.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l412tb.rs b/embassy-stm32/src/pac/stm32l412tb.rs index 1954ee899..fda1af224 100644 --- a/embassy-stm32/src/pac/stm32l412tb.rs +++ b/embassy-stm32/src/pac/stm32l412tb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l422cb.rs b/embassy-stm32/src/pac/stm32l422cb.rs index 39b471a77..8b640bfd2 100644 --- a/embassy-stm32/src/pac/stm32l422cb.rs +++ b/embassy-stm32/src/pac/stm32l422cb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l422kb.rs b/embassy-stm32/src/pac/stm32l422kb.rs index 42318d113..8f407c054 100644 --- a/embassy-stm32/src/pac/stm32l422kb.rs +++ b/embassy-stm32/src/pac/stm32l422kb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l422rb.rs b/embassy-stm32/src/pac/stm32l422rb.rs index 39b471a77..8b640bfd2 100644 --- a/embassy-stm32/src/pac/stm32l422rb.rs +++ b/embassy-stm32/src/pac/stm32l422rb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l422tb.rs b/embassy-stm32/src/pac/stm32l422tb.rs index 42318d113..8f407c054 100644 --- a/embassy-stm32/src/pac/stm32l422tb.rs +++ b/embassy-stm32/src/pac/stm32l422tb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l431cb.rs b/embassy-stm32/src/pac/stm32l431cb.rs index 5cdbfe4ad..fc01e44d8 100644 --- a/embassy-stm32/src/pac/stm32l431cb.rs +++ b/embassy-stm32/src/pac/stm32l431cb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l431cc.rs b/embassy-stm32/src/pac/stm32l431cc.rs index 5cdbfe4ad..fc01e44d8 100644 --- a/embassy-stm32/src/pac/stm32l431cc.rs +++ b/embassy-stm32/src/pac/stm32l431cc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l431kb.rs b/embassy-stm32/src/pac/stm32l431kb.rs index c127f72a9..f569524fc 100644 --- a/embassy-stm32/src/pac/stm32l431kb.rs +++ b/embassy-stm32/src/pac/stm32l431kb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l431kc.rs b/embassy-stm32/src/pac/stm32l431kc.rs index c127f72a9..f569524fc 100644 --- a/embassy-stm32/src/pac/stm32l431kc.rs +++ b/embassy-stm32/src/pac/stm32l431kc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l431rb.rs b/embassy-stm32/src/pac/stm32l431rb.rs index 5cdbfe4ad..fc01e44d8 100644 --- a/embassy-stm32/src/pac/stm32l431rb.rs +++ b/embassy-stm32/src/pac/stm32l431rb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l431rc.rs b/embassy-stm32/src/pac/stm32l431rc.rs index 5cdbfe4ad..fc01e44d8 100644 --- a/embassy-stm32/src/pac/stm32l431rc.rs +++ b/embassy-stm32/src/pac/stm32l431rc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l431vc.rs b/embassy-stm32/src/pac/stm32l431vc.rs index 5cdbfe4ad..fc01e44d8 100644 --- a/embassy-stm32/src/pac/stm32l431vc.rs +++ b/embassy-stm32/src/pac/stm32l431vc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l432kb.rs b/embassy-stm32/src/pac/stm32l432kb.rs index 710b9a553..83a089713 100644 --- a/embassy-stm32/src/pac/stm32l432kb.rs +++ b/embassy-stm32/src/pac/stm32l432kb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l432kc.rs b/embassy-stm32/src/pac/stm32l432kc.rs index 710b9a553..83a089713 100644 --- a/embassy-stm32/src/pac/stm32l432kc.rs +++ b/embassy-stm32/src/pac/stm32l432kc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l433cb.rs b/embassy-stm32/src/pac/stm32l433cb.rs index c0a20384b..1257e699d 100644 --- a/embassy-stm32/src/pac/stm32l433cb.rs +++ b/embassy-stm32/src/pac/stm32l433cb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l433cc.rs b/embassy-stm32/src/pac/stm32l433cc.rs index c0a20384b..1257e699d 100644 --- a/embassy-stm32/src/pac/stm32l433cc.rs +++ b/embassy-stm32/src/pac/stm32l433cc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l433rb.rs b/embassy-stm32/src/pac/stm32l433rb.rs index c0a20384b..1257e699d 100644 --- a/embassy-stm32/src/pac/stm32l433rb.rs +++ b/embassy-stm32/src/pac/stm32l433rb.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l433rc.rs b/embassy-stm32/src/pac/stm32l433rc.rs index c0a20384b..1257e699d 100644 --- a/embassy-stm32/src/pac/stm32l433rc.rs +++ b/embassy-stm32/src/pac/stm32l433rc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l433vc.rs b/embassy-stm32/src/pac/stm32l433vc.rs index c0a20384b..1257e699d 100644 --- a/embassy-stm32/src/pac/stm32l433vc.rs +++ b/embassy-stm32/src/pac/stm32l433vc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l442kc.rs b/embassy-stm32/src/pac/stm32l442kc.rs index 50327e478..11e64acdb 100644 --- a/embassy-stm32/src/pac/stm32l442kc.rs +++ b/embassy-stm32/src/pac/stm32l442kc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l443cc.rs b/embassy-stm32/src/pac/stm32l443cc.rs index 7b2c924d2..07bcb8f26 100644 --- a/embassy-stm32/src/pac/stm32l443cc.rs +++ b/embassy-stm32/src/pac/stm32l443cc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l443rc.rs b/embassy-stm32/src/pac/stm32l443rc.rs index 7b2c924d2..07bcb8f26 100644 --- a/embassy-stm32/src/pac/stm32l443rc.rs +++ b/embassy-stm32/src/pac/stm32l443rc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l443vc.rs b/embassy-stm32/src/pac/stm32l443vc.rs index 7b2c924d2..07bcb8f26 100644 --- a/embassy-stm32/src/pac/stm32l443vc.rs +++ b/embassy-stm32/src/pac/stm32l443vc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l451cc.rs b/embassy-stm32/src/pac/stm32l451cc.rs index d7fac3bfe..d90f1ff74 100644 --- a/embassy-stm32/src/pac/stm32l451cc.rs +++ b/embassy-stm32/src/pac/stm32l451cc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l451ce.rs b/embassy-stm32/src/pac/stm32l451ce.rs index d7fac3bfe..d90f1ff74 100644 --- a/embassy-stm32/src/pac/stm32l451ce.rs +++ b/embassy-stm32/src/pac/stm32l451ce.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l451rc.rs b/embassy-stm32/src/pac/stm32l451rc.rs index d7fac3bfe..d90f1ff74 100644 --- a/embassy-stm32/src/pac/stm32l451rc.rs +++ b/embassy-stm32/src/pac/stm32l451rc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l451re.rs b/embassy-stm32/src/pac/stm32l451re.rs index d7fac3bfe..d90f1ff74 100644 --- a/embassy-stm32/src/pac/stm32l451re.rs +++ b/embassy-stm32/src/pac/stm32l451re.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l451vc.rs b/embassy-stm32/src/pac/stm32l451vc.rs index d7fac3bfe..d90f1ff74 100644 --- a/embassy-stm32/src/pac/stm32l451vc.rs +++ b/embassy-stm32/src/pac/stm32l451vc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l451ve.rs b/embassy-stm32/src/pac/stm32l451ve.rs index d7fac3bfe..d90f1ff74 100644 --- a/embassy-stm32/src/pac/stm32l451ve.rs +++ b/embassy-stm32/src/pac/stm32l451ve.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l452cc.rs b/embassy-stm32/src/pac/stm32l452cc.rs index c63b796eb..34e55cda6 100644 --- a/embassy-stm32/src/pac/stm32l452cc.rs +++ b/embassy-stm32/src/pac/stm32l452cc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l452ce.rs b/embassy-stm32/src/pac/stm32l452ce.rs index c63b796eb..34e55cda6 100644 --- a/embassy-stm32/src/pac/stm32l452ce.rs +++ b/embassy-stm32/src/pac/stm32l452ce.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l452rc.rs b/embassy-stm32/src/pac/stm32l452rc.rs index c63b796eb..34e55cda6 100644 --- a/embassy-stm32/src/pac/stm32l452rc.rs +++ b/embassy-stm32/src/pac/stm32l452rc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l452re.rs b/embassy-stm32/src/pac/stm32l452re.rs index c63b796eb..34e55cda6 100644 --- a/embassy-stm32/src/pac/stm32l452re.rs +++ b/embassy-stm32/src/pac/stm32l452re.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l452vc.rs b/embassy-stm32/src/pac/stm32l452vc.rs index c63b796eb..34e55cda6 100644 --- a/embassy-stm32/src/pac/stm32l452vc.rs +++ b/embassy-stm32/src/pac/stm32l452vc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l452ve.rs b/embassy-stm32/src/pac/stm32l452ve.rs index c63b796eb..34e55cda6 100644 --- a/embassy-stm32/src/pac/stm32l452ve.rs +++ b/embassy-stm32/src/pac/stm32l452ve.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l462ce.rs b/embassy-stm32/src/pac/stm32l462ce.rs index 1e16213e7..6a25f7e08 100644 --- a/embassy-stm32/src/pac/stm32l462ce.rs +++ b/embassy-stm32/src/pac/stm32l462ce.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l462re.rs b/embassy-stm32/src/pac/stm32l462re.rs index 1e16213e7..6a25f7e08 100644 --- a/embassy-stm32/src/pac/stm32l462re.rs +++ b/embassy-stm32/src/pac/stm32l462re.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l462ve.rs b/embassy-stm32/src/pac/stm32l462ve.rs index 1e16213e7..6a25f7e08 100644 --- a/embassy-stm32/src/pac/stm32l462ve.rs +++ b/embassy-stm32/src/pac/stm32l462ve.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l471qe.rs b/embassy-stm32/src/pac/stm32l471qe.rs index 9bd000b6d..27c3ac06a 100644 --- a/embassy-stm32/src/pac/stm32l471qe.rs +++ b/embassy-stm32/src/pac/stm32l471qe.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l471qg.rs b/embassy-stm32/src/pac/stm32l471qg.rs index 9bd000b6d..27c3ac06a 100644 --- a/embassy-stm32/src/pac/stm32l471qg.rs +++ b/embassy-stm32/src/pac/stm32l471qg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l471re.rs b/embassy-stm32/src/pac/stm32l471re.rs index 9bd000b6d..27c3ac06a 100644 --- a/embassy-stm32/src/pac/stm32l471re.rs +++ b/embassy-stm32/src/pac/stm32l471re.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l471rg.rs b/embassy-stm32/src/pac/stm32l471rg.rs index 9bd000b6d..27c3ac06a 100644 --- a/embassy-stm32/src/pac/stm32l471rg.rs +++ b/embassy-stm32/src/pac/stm32l471rg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l471ve.rs b/embassy-stm32/src/pac/stm32l471ve.rs index 9bd000b6d..27c3ac06a 100644 --- a/embassy-stm32/src/pac/stm32l471ve.rs +++ b/embassy-stm32/src/pac/stm32l471ve.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l471vg.rs b/embassy-stm32/src/pac/stm32l471vg.rs index 9bd000b6d..27c3ac06a 100644 --- a/embassy-stm32/src/pac/stm32l471vg.rs +++ b/embassy-stm32/src/pac/stm32l471vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l471ze.rs b/embassy-stm32/src/pac/stm32l471ze.rs index 9bd000b6d..27c3ac06a 100644 --- a/embassy-stm32/src/pac/stm32l471ze.rs +++ b/embassy-stm32/src/pac/stm32l471ze.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l471zg.rs b/embassy-stm32/src/pac/stm32l471zg.rs index 9bd000b6d..27c3ac06a 100644 --- a/embassy-stm32/src/pac/stm32l471zg.rs +++ b/embassy-stm32/src/pac/stm32l471zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l475rc.rs b/embassy-stm32/src/pac/stm32l475rc.rs index 869f68222..4a6d511fd 100644 --- a/embassy-stm32/src/pac/stm32l475rc.rs +++ b/embassy-stm32/src/pac/stm32l475rc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l475re.rs b/embassy-stm32/src/pac/stm32l475re.rs index 869f68222..4a6d511fd 100644 --- a/embassy-stm32/src/pac/stm32l475re.rs +++ b/embassy-stm32/src/pac/stm32l475re.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l475rg.rs b/embassy-stm32/src/pac/stm32l475rg.rs index 869f68222..4a6d511fd 100644 --- a/embassy-stm32/src/pac/stm32l475rg.rs +++ b/embassy-stm32/src/pac/stm32l475rg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l475vc.rs b/embassy-stm32/src/pac/stm32l475vc.rs index 869f68222..4a6d511fd 100644 --- a/embassy-stm32/src/pac/stm32l475vc.rs +++ b/embassy-stm32/src/pac/stm32l475vc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l475ve.rs b/embassy-stm32/src/pac/stm32l475ve.rs index 869f68222..4a6d511fd 100644 --- a/embassy-stm32/src/pac/stm32l475ve.rs +++ b/embassy-stm32/src/pac/stm32l475ve.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l475vg.rs b/embassy-stm32/src/pac/stm32l475vg.rs index 869f68222..4a6d511fd 100644 --- a/embassy-stm32/src/pac/stm32l475vg.rs +++ b/embassy-stm32/src/pac/stm32l475vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l476je.rs b/embassy-stm32/src/pac/stm32l476je.rs index 6b5cb4ba6..6ab0659fc 100644 --- a/embassy-stm32/src/pac/stm32l476je.rs +++ b/embassy-stm32/src/pac/stm32l476je.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l476jg.rs b/embassy-stm32/src/pac/stm32l476jg.rs index 6b5cb4ba6..6ab0659fc 100644 --- a/embassy-stm32/src/pac/stm32l476jg.rs +++ b/embassy-stm32/src/pac/stm32l476jg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l476me.rs b/embassy-stm32/src/pac/stm32l476me.rs index 6b5cb4ba6..6ab0659fc 100644 --- a/embassy-stm32/src/pac/stm32l476me.rs +++ b/embassy-stm32/src/pac/stm32l476me.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l476mg.rs b/embassy-stm32/src/pac/stm32l476mg.rs index 6b5cb4ba6..6ab0659fc 100644 --- a/embassy-stm32/src/pac/stm32l476mg.rs +++ b/embassy-stm32/src/pac/stm32l476mg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l476qe.rs b/embassy-stm32/src/pac/stm32l476qe.rs index 6b5cb4ba6..6ab0659fc 100644 --- a/embassy-stm32/src/pac/stm32l476qe.rs +++ b/embassy-stm32/src/pac/stm32l476qe.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l476qg.rs b/embassy-stm32/src/pac/stm32l476qg.rs index 6b5cb4ba6..6ab0659fc 100644 --- a/embassy-stm32/src/pac/stm32l476qg.rs +++ b/embassy-stm32/src/pac/stm32l476qg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l476rc.rs b/embassy-stm32/src/pac/stm32l476rc.rs index 6b5cb4ba6..6ab0659fc 100644 --- a/embassy-stm32/src/pac/stm32l476rc.rs +++ b/embassy-stm32/src/pac/stm32l476rc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l476re.rs b/embassy-stm32/src/pac/stm32l476re.rs index 6b5cb4ba6..6ab0659fc 100644 --- a/embassy-stm32/src/pac/stm32l476re.rs +++ b/embassy-stm32/src/pac/stm32l476re.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l476rg.rs b/embassy-stm32/src/pac/stm32l476rg.rs index 6b5cb4ba6..6ab0659fc 100644 --- a/embassy-stm32/src/pac/stm32l476rg.rs +++ b/embassy-stm32/src/pac/stm32l476rg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l476vc.rs b/embassy-stm32/src/pac/stm32l476vc.rs index 6b5cb4ba6..6ab0659fc 100644 --- a/embassy-stm32/src/pac/stm32l476vc.rs +++ b/embassy-stm32/src/pac/stm32l476vc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l476ve.rs b/embassy-stm32/src/pac/stm32l476ve.rs index 6b5cb4ba6..6ab0659fc 100644 --- a/embassy-stm32/src/pac/stm32l476ve.rs +++ b/embassy-stm32/src/pac/stm32l476ve.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l476vg.rs b/embassy-stm32/src/pac/stm32l476vg.rs index 6b5cb4ba6..6ab0659fc 100644 --- a/embassy-stm32/src/pac/stm32l476vg.rs +++ b/embassy-stm32/src/pac/stm32l476vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l476ze.rs b/embassy-stm32/src/pac/stm32l476ze.rs index 6b5cb4ba6..6ab0659fc 100644 --- a/embassy-stm32/src/pac/stm32l476ze.rs +++ b/embassy-stm32/src/pac/stm32l476ze.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l476zg.rs b/embassy-stm32/src/pac/stm32l476zg.rs index 6b5cb4ba6..6ab0659fc 100644 --- a/embassy-stm32/src/pac/stm32l476zg.rs +++ b/embassy-stm32/src/pac/stm32l476zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l485jc.rs b/embassy-stm32/src/pac/stm32l485jc.rs index 7d2a07af2..028c25032 100644 --- a/embassy-stm32/src/pac/stm32l485jc.rs +++ b/embassy-stm32/src/pac/stm32l485jc.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l485je.rs b/embassy-stm32/src/pac/stm32l485je.rs index 7d2a07af2..028c25032 100644 --- a/embassy-stm32/src/pac/stm32l485je.rs +++ b/embassy-stm32/src/pac/stm32l485je.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l486jg.rs b/embassy-stm32/src/pac/stm32l486jg.rs index 7a76d404d..78cf49a59 100644 --- a/embassy-stm32/src/pac/stm32l486jg.rs +++ b/embassy-stm32/src/pac/stm32l486jg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l486qg.rs b/embassy-stm32/src/pac/stm32l486qg.rs index 7a76d404d..78cf49a59 100644 --- a/embassy-stm32/src/pac/stm32l486qg.rs +++ b/embassy-stm32/src/pac/stm32l486qg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l486rg.rs b/embassy-stm32/src/pac/stm32l486rg.rs index 7a76d404d..78cf49a59 100644 --- a/embassy-stm32/src/pac/stm32l486rg.rs +++ b/embassy-stm32/src/pac/stm32l486rg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l486vg.rs b/embassy-stm32/src/pac/stm32l486vg.rs index 7a76d404d..78cf49a59 100644 --- a/embassy-stm32/src/pac/stm32l486vg.rs +++ b/embassy-stm32/src/pac/stm32l486vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l486zg.rs b/embassy-stm32/src/pac/stm32l486zg.rs index 7a76d404d..78cf49a59 100644 --- a/embassy-stm32/src/pac/stm32l486zg.rs +++ b/embassy-stm32/src/pac/stm32l486zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l496ae.rs b/embassy-stm32/src/pac/stm32l496ae.rs index f10fd969e..7d569ed50 100644 --- a/embassy-stm32/src/pac/stm32l496ae.rs +++ b/embassy-stm32/src/pac/stm32l496ae.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l496ag.rs b/embassy-stm32/src/pac/stm32l496ag.rs index f10fd969e..7d569ed50 100644 --- a/embassy-stm32/src/pac/stm32l496ag.rs +++ b/embassy-stm32/src/pac/stm32l496ag.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l496qe.rs b/embassy-stm32/src/pac/stm32l496qe.rs index f10fd969e..7d569ed50 100644 --- a/embassy-stm32/src/pac/stm32l496qe.rs +++ b/embassy-stm32/src/pac/stm32l496qe.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l496qg.rs b/embassy-stm32/src/pac/stm32l496qg.rs index f10fd969e..7d569ed50 100644 --- a/embassy-stm32/src/pac/stm32l496qg.rs +++ b/embassy-stm32/src/pac/stm32l496qg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l496re.rs b/embassy-stm32/src/pac/stm32l496re.rs index f10fd969e..7d569ed50 100644 --- a/embassy-stm32/src/pac/stm32l496re.rs +++ b/embassy-stm32/src/pac/stm32l496re.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l496rg.rs b/embassy-stm32/src/pac/stm32l496rg.rs index f10fd969e..7d569ed50 100644 --- a/embassy-stm32/src/pac/stm32l496rg.rs +++ b/embassy-stm32/src/pac/stm32l496rg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l496ve.rs b/embassy-stm32/src/pac/stm32l496ve.rs index f10fd969e..7d569ed50 100644 --- a/embassy-stm32/src/pac/stm32l496ve.rs +++ b/embassy-stm32/src/pac/stm32l496ve.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l496vg.rs b/embassy-stm32/src/pac/stm32l496vg.rs index f10fd969e..7d569ed50 100644 --- a/embassy-stm32/src/pac/stm32l496vg.rs +++ b/embassy-stm32/src/pac/stm32l496vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l496wg.rs b/embassy-stm32/src/pac/stm32l496wg.rs index f10fd969e..7d569ed50 100644 --- a/embassy-stm32/src/pac/stm32l496wg.rs +++ b/embassy-stm32/src/pac/stm32l496wg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l496ze.rs b/embassy-stm32/src/pac/stm32l496ze.rs index f10fd969e..7d569ed50 100644 --- a/embassy-stm32/src/pac/stm32l496ze.rs +++ b/embassy-stm32/src/pac/stm32l496ze.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l496zg.rs b/embassy-stm32/src/pac/stm32l496zg.rs index f10fd969e..7d569ed50 100644 --- a/embassy-stm32/src/pac/stm32l496zg.rs +++ b/embassy-stm32/src/pac/stm32l496zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4a6ag.rs b/embassy-stm32/src/pac/stm32l4a6ag.rs index 863a12743..b28bbe800 100644 --- a/embassy-stm32/src/pac/stm32l4a6ag.rs +++ b/embassy-stm32/src/pac/stm32l4a6ag.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4a6qg.rs b/embassy-stm32/src/pac/stm32l4a6qg.rs index 863a12743..b28bbe800 100644 --- a/embassy-stm32/src/pac/stm32l4a6qg.rs +++ b/embassy-stm32/src/pac/stm32l4a6qg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4a6rg.rs b/embassy-stm32/src/pac/stm32l4a6rg.rs index 863a12743..b28bbe800 100644 --- a/embassy-stm32/src/pac/stm32l4a6rg.rs +++ b/embassy-stm32/src/pac/stm32l4a6rg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4a6vg.rs b/embassy-stm32/src/pac/stm32l4a6vg.rs index 863a12743..b28bbe800 100644 --- a/embassy-stm32/src/pac/stm32l4a6vg.rs +++ b/embassy-stm32/src/pac/stm32l4a6vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4a6zg.rs b/embassy-stm32/src/pac/stm32l4a6zg.rs index 863a12743..b28bbe800 100644 --- a/embassy-stm32/src/pac/stm32l4a6zg.rs +++ b/embassy-stm32/src/pac/stm32l4a6zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4p5ae.rs b/embassy-stm32/src/pac/stm32l4p5ae.rs index c68939c44..e5554d64a 100644 --- a/embassy-stm32/src/pac/stm32l4p5ae.rs +++ b/embassy-stm32/src/pac/stm32l4p5ae.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4p5ag.rs b/embassy-stm32/src/pac/stm32l4p5ag.rs index c68939c44..e5554d64a 100644 --- a/embassy-stm32/src/pac/stm32l4p5ag.rs +++ b/embassy-stm32/src/pac/stm32l4p5ag.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4p5ce.rs b/embassy-stm32/src/pac/stm32l4p5ce.rs index c68939c44..e5554d64a 100644 --- a/embassy-stm32/src/pac/stm32l4p5ce.rs +++ b/embassy-stm32/src/pac/stm32l4p5ce.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4p5cg.rs b/embassy-stm32/src/pac/stm32l4p5cg.rs index c68939c44..e5554d64a 100644 --- a/embassy-stm32/src/pac/stm32l4p5cg.rs +++ b/embassy-stm32/src/pac/stm32l4p5cg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4p5qe.rs b/embassy-stm32/src/pac/stm32l4p5qe.rs index c68939c44..e5554d64a 100644 --- a/embassy-stm32/src/pac/stm32l4p5qe.rs +++ b/embassy-stm32/src/pac/stm32l4p5qe.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4p5qg.rs b/embassy-stm32/src/pac/stm32l4p5qg.rs index c68939c44..e5554d64a 100644 --- a/embassy-stm32/src/pac/stm32l4p5qg.rs +++ b/embassy-stm32/src/pac/stm32l4p5qg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4p5re.rs b/embassy-stm32/src/pac/stm32l4p5re.rs index c68939c44..e5554d64a 100644 --- a/embassy-stm32/src/pac/stm32l4p5re.rs +++ b/embassy-stm32/src/pac/stm32l4p5re.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4p5rg.rs b/embassy-stm32/src/pac/stm32l4p5rg.rs index c68939c44..e5554d64a 100644 --- a/embassy-stm32/src/pac/stm32l4p5rg.rs +++ b/embassy-stm32/src/pac/stm32l4p5rg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4p5ve.rs b/embassy-stm32/src/pac/stm32l4p5ve.rs index c68939c44..e5554d64a 100644 --- a/embassy-stm32/src/pac/stm32l4p5ve.rs +++ b/embassy-stm32/src/pac/stm32l4p5ve.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4p5vg.rs b/embassy-stm32/src/pac/stm32l4p5vg.rs index c68939c44..e5554d64a 100644 --- a/embassy-stm32/src/pac/stm32l4p5vg.rs +++ b/embassy-stm32/src/pac/stm32l4p5vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4p5ze.rs b/embassy-stm32/src/pac/stm32l4p5ze.rs index c68939c44..e5554d64a 100644 --- a/embassy-stm32/src/pac/stm32l4p5ze.rs +++ b/embassy-stm32/src/pac/stm32l4p5ze.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4p5zg.rs b/embassy-stm32/src/pac/stm32l4p5zg.rs index c68939c44..e5554d64a 100644 --- a/embassy-stm32/src/pac/stm32l4p5zg.rs +++ b/embassy-stm32/src/pac/stm32l4p5zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4q5ag.rs b/embassy-stm32/src/pac/stm32l4q5ag.rs index e7e561f96..b60fa840a 100644 --- a/embassy-stm32/src/pac/stm32l4q5ag.rs +++ b/embassy-stm32/src/pac/stm32l4q5ag.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4q5cg.rs b/embassy-stm32/src/pac/stm32l4q5cg.rs index e7e561f96..b60fa840a 100644 --- a/embassy-stm32/src/pac/stm32l4q5cg.rs +++ b/embassy-stm32/src/pac/stm32l4q5cg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4q5qg.rs b/embassy-stm32/src/pac/stm32l4q5qg.rs index e7e561f96..b60fa840a 100644 --- a/embassy-stm32/src/pac/stm32l4q5qg.rs +++ b/embassy-stm32/src/pac/stm32l4q5qg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4q5rg.rs b/embassy-stm32/src/pac/stm32l4q5rg.rs index e7e561f96..b60fa840a 100644 --- a/embassy-stm32/src/pac/stm32l4q5rg.rs +++ b/embassy-stm32/src/pac/stm32l4q5rg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4q5vg.rs b/embassy-stm32/src/pac/stm32l4q5vg.rs index e7e561f96..b60fa840a 100644 --- a/embassy-stm32/src/pac/stm32l4q5vg.rs +++ b/embassy-stm32/src/pac/stm32l4q5vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4q5zg.rs b/embassy-stm32/src/pac/stm32l4q5zg.rs index e7e561f96..b60fa840a 100644 --- a/embassy-stm32/src/pac/stm32l4q5zg.rs +++ b/embassy-stm32/src/pac/stm32l4q5zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4r5ag.rs b/embassy-stm32/src/pac/stm32l4r5ag.rs index 7cc4382db..5d6d3b8a5 100644 --- a/embassy-stm32/src/pac/stm32l4r5ag.rs +++ b/embassy-stm32/src/pac/stm32l4r5ag.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4r5ai.rs b/embassy-stm32/src/pac/stm32l4r5ai.rs index 7cc4382db..5d6d3b8a5 100644 --- a/embassy-stm32/src/pac/stm32l4r5ai.rs +++ b/embassy-stm32/src/pac/stm32l4r5ai.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4r5qg.rs b/embassy-stm32/src/pac/stm32l4r5qg.rs index 7cc4382db..5d6d3b8a5 100644 --- a/embassy-stm32/src/pac/stm32l4r5qg.rs +++ b/embassy-stm32/src/pac/stm32l4r5qg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4r5qi.rs b/embassy-stm32/src/pac/stm32l4r5qi.rs index 7cc4382db..5d6d3b8a5 100644 --- a/embassy-stm32/src/pac/stm32l4r5qi.rs +++ b/embassy-stm32/src/pac/stm32l4r5qi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4r5vg.rs b/embassy-stm32/src/pac/stm32l4r5vg.rs index 7cc4382db..5d6d3b8a5 100644 --- a/embassy-stm32/src/pac/stm32l4r5vg.rs +++ b/embassy-stm32/src/pac/stm32l4r5vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4r5vi.rs b/embassy-stm32/src/pac/stm32l4r5vi.rs index 7cc4382db..5d6d3b8a5 100644 --- a/embassy-stm32/src/pac/stm32l4r5vi.rs +++ b/embassy-stm32/src/pac/stm32l4r5vi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4r5zg.rs b/embassy-stm32/src/pac/stm32l4r5zg.rs index 7cc4382db..5d6d3b8a5 100644 --- a/embassy-stm32/src/pac/stm32l4r5zg.rs +++ b/embassy-stm32/src/pac/stm32l4r5zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4r5zi.rs b/embassy-stm32/src/pac/stm32l4r5zi.rs index 7cc4382db..5d6d3b8a5 100644 --- a/embassy-stm32/src/pac/stm32l4r5zi.rs +++ b/embassy-stm32/src/pac/stm32l4r5zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4r7ai.rs b/embassy-stm32/src/pac/stm32l4r7ai.rs index a55594bbd..ce8e20c9c 100644 --- a/embassy-stm32/src/pac/stm32l4r7ai.rs +++ b/embassy-stm32/src/pac/stm32l4r7ai.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4r7vi.rs b/embassy-stm32/src/pac/stm32l4r7vi.rs index a55594bbd..ce8e20c9c 100644 --- a/embassy-stm32/src/pac/stm32l4r7vi.rs +++ b/embassy-stm32/src/pac/stm32l4r7vi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4r7zi.rs b/embassy-stm32/src/pac/stm32l4r7zi.rs index a55594bbd..ce8e20c9c 100644 --- a/embassy-stm32/src/pac/stm32l4r7zi.rs +++ b/embassy-stm32/src/pac/stm32l4r7zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4r9ag.rs b/embassy-stm32/src/pac/stm32l4r9ag.rs index 7d4e36993..8dc7f9aa1 100644 --- a/embassy-stm32/src/pac/stm32l4r9ag.rs +++ b/embassy-stm32/src/pac/stm32l4r9ag.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4r9ai.rs b/embassy-stm32/src/pac/stm32l4r9ai.rs index 7d4e36993..8dc7f9aa1 100644 --- a/embassy-stm32/src/pac/stm32l4r9ai.rs +++ b/embassy-stm32/src/pac/stm32l4r9ai.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4r9vg.rs b/embassy-stm32/src/pac/stm32l4r9vg.rs index 7d4e36993..8dc7f9aa1 100644 --- a/embassy-stm32/src/pac/stm32l4r9vg.rs +++ b/embassy-stm32/src/pac/stm32l4r9vg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4r9vi.rs b/embassy-stm32/src/pac/stm32l4r9vi.rs index 7d4e36993..8dc7f9aa1 100644 --- a/embassy-stm32/src/pac/stm32l4r9vi.rs +++ b/embassy-stm32/src/pac/stm32l4r9vi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4r9zg.rs b/embassy-stm32/src/pac/stm32l4r9zg.rs index 7d4e36993..8dc7f9aa1 100644 --- a/embassy-stm32/src/pac/stm32l4r9zg.rs +++ b/embassy-stm32/src/pac/stm32l4r9zg.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4r9zi.rs b/embassy-stm32/src/pac/stm32l4r9zi.rs index 7d4e36993..8dc7f9aa1 100644 --- a/embassy-stm32/src/pac/stm32l4r9zi.rs +++ b/embassy-stm32/src/pac/stm32l4r9zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4s5ai.rs b/embassy-stm32/src/pac/stm32l4s5ai.rs index 18e5329f9..1b8ae228b 100644 --- a/embassy-stm32/src/pac/stm32l4s5ai.rs +++ b/embassy-stm32/src/pac/stm32l4s5ai.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4s5qi.rs b/embassy-stm32/src/pac/stm32l4s5qi.rs index 18e5329f9..1b8ae228b 100644 --- a/embassy-stm32/src/pac/stm32l4s5qi.rs +++ b/embassy-stm32/src/pac/stm32l4s5qi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4s5vi.rs b/embassy-stm32/src/pac/stm32l4s5vi.rs index 18e5329f9..1b8ae228b 100644 --- a/embassy-stm32/src/pac/stm32l4s5vi.rs +++ b/embassy-stm32/src/pac/stm32l4s5vi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4s5zi.rs b/embassy-stm32/src/pac/stm32l4s5zi.rs index 18e5329f9..1b8ae228b 100644 --- a/embassy-stm32/src/pac/stm32l4s5zi.rs +++ b/embassy-stm32/src/pac/stm32l4s5zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4s7ai.rs b/embassy-stm32/src/pac/stm32l4s7ai.rs index ff250542d..8758dc152 100644 --- a/embassy-stm32/src/pac/stm32l4s7ai.rs +++ b/embassy-stm32/src/pac/stm32l4s7ai.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4s7vi.rs b/embassy-stm32/src/pac/stm32l4s7vi.rs index ff250542d..8758dc152 100644 --- a/embassy-stm32/src/pac/stm32l4s7vi.rs +++ b/embassy-stm32/src/pac/stm32l4s7vi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4s7zi.rs b/embassy-stm32/src/pac/stm32l4s7zi.rs index ff250542d..8758dc152 100644 --- a/embassy-stm32/src/pac/stm32l4s7zi.rs +++ b/embassy-stm32/src/pac/stm32l4s7zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4s9ai.rs b/embassy-stm32/src/pac/stm32l4s9ai.rs index ebd64c96b..8daaab626 100644 --- a/embassy-stm32/src/pac/stm32l4s9ai.rs +++ b/embassy-stm32/src/pac/stm32l4s9ai.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4s9vi.rs b/embassy-stm32/src/pac/stm32l4s9vi.rs index ebd64c96b..8daaab626 100644 --- a/embassy-stm32/src/pac/stm32l4s9vi.rs +++ b/embassy-stm32/src/pac/stm32l4s9vi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/pac/stm32l4s9zi.rs b/embassy-stm32/src/pac/stm32l4s9zi.rs index ebd64c96b..8daaab626 100644 --- a/embassy-stm32/src/pac/stm32l4s9zi.rs +++ b/embassy-stm32/src/pac/stm32l4s9zi.rs | |||
| @@ -6,23 +6,23 @@ pub fn GPIO(n: usize) -> gpio::Gpio { | |||
| 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) | 6 | gpio::Gpio((0x48000000 + 0x400 * n) as _) |
| 7 | } | 7 | } |
| 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); | 8 | pub const DMA1: dma::Dma = dma::Dma(0x40020000 as _); |
| 9 | impl_dma_channel!(DMA1_CH0, DMA1, 0); | 9 | impl_dma_channel!(DMA1_CH0, 0, 0); |
| 10 | impl_dma_channel!(DMA1_CH1, DMA1, 1); | 10 | impl_dma_channel!(DMA1_CH1, 0, 1); |
| 11 | impl_dma_channel!(DMA1_CH2, DMA1, 2); | 11 | impl_dma_channel!(DMA1_CH2, 0, 2); |
| 12 | impl_dma_channel!(DMA1_CH3, DMA1, 3); | 12 | impl_dma_channel!(DMA1_CH3, 0, 3); |
| 13 | impl_dma_channel!(DMA1_CH4, DMA1, 4); | 13 | impl_dma_channel!(DMA1_CH4, 0, 4); |
| 14 | impl_dma_channel!(DMA1_CH5, DMA1, 5); | 14 | impl_dma_channel!(DMA1_CH5, 0, 5); |
| 15 | impl_dma_channel!(DMA1_CH6, DMA1, 6); | 15 | impl_dma_channel!(DMA1_CH6, 0, 6); |
| 16 | impl_dma_channel!(DMA1_CH7, DMA1, 7); | 16 | impl_dma_channel!(DMA1_CH7, 0, 7); |
| 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); | 17 | pub const DMA2: dma::Dma = dma::Dma(0x40020400 as _); |
| 18 | impl_dma_channel!(DMA2_CH0, DMA2, 0); | 18 | impl_dma_channel!(DMA2_CH0, 1, 0); |
| 19 | impl_dma_channel!(DMA2_CH1, DMA2, 1); | 19 | impl_dma_channel!(DMA2_CH1, 1, 1); |
| 20 | impl_dma_channel!(DMA2_CH2, DMA2, 2); | 20 | impl_dma_channel!(DMA2_CH2, 1, 2); |
| 21 | impl_dma_channel!(DMA2_CH3, DMA2, 3); | 21 | impl_dma_channel!(DMA2_CH3, 1, 3); |
| 22 | impl_dma_channel!(DMA2_CH4, DMA2, 4); | 22 | impl_dma_channel!(DMA2_CH4, 1, 4); |
| 23 | impl_dma_channel!(DMA2_CH5, DMA2, 5); | 23 | impl_dma_channel!(DMA2_CH5, 1, 5); |
| 24 | impl_dma_channel!(DMA2_CH6, DMA2, 6); | 24 | impl_dma_channel!(DMA2_CH6, 1, 6); |
| 25 | impl_dma_channel!(DMA2_CH7, DMA2, 7); | 25 | impl_dma_channel!(DMA2_CH7, 1, 7); |
| 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); | 26 | pub const EXTI: exti::Exti = exti::Exti(0x40010400 as _); |
| 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); | 27 | pub const GPIOA: gpio::Gpio = gpio::Gpio(0x48000000 as _); |
| 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); | 28 | impl_gpio_pin!(PA0, 0, 0, EXTI0); |
diff --git a/embassy-stm32/src/usart/usart_v1.rs b/embassy-stm32/src/usart/usart_v1.rs index baaf4fa30..03ccd1447 100644 --- a/embassy-stm32/src/usart/usart_v1.rs +++ b/embassy-stm32/src/usart/usart_v1.rs | |||
| @@ -3,9 +3,9 @@ use core::marker::PhantomData; | |||
| 3 | use embassy::util::Unborrow; | 3 | use embassy::util::Unborrow; |
| 4 | use embassy_extras::unborrow; | 4 | use embassy_extras::unborrow; |
| 5 | 5 | ||
| 6 | use crate::dma::{transfer_m2p, Channel}; | ||
| 6 | use crate::gpio::{NoPin, Pin}; | 7 | use crate::gpio::{NoPin, Pin}; |
| 7 | use crate::pac::usart::{regs, vals, Usart}; | 8 | use crate::pac::usart::{regs, vals, Usart}; |
| 8 | use crate::peripherals; | ||
| 9 | 9 | ||
| 10 | use super::*; | 10 | use super::*; |
| 11 | 11 | ||
| @@ -103,6 +103,23 @@ impl<'d, T: Instance> Uart<'d, T> { | |||
| 103 | } | 103 | } |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | pub async fn write_dma(&mut self, ch: &mut impl Channel, buffer: &[u8]) -> Result<(), Error> { | ||
| 107 | let ch_func = 4; // USART3_TX | ||
| 108 | let r = self.inner.regs(); | ||
| 109 | |||
| 110 | unsafe { | ||
| 111 | r.cr3().write(|w| { | ||
| 112 | w.set_dmat(true); | ||
| 113 | }); | ||
| 114 | |||
| 115 | let dst = r.dr().ptr() as *mut u8; | ||
| 116 | |||
| 117 | transfer_m2p(ch, ch_func, buffer, dst).await; | ||
| 118 | } | ||
| 119 | |||
| 120 | Ok(()) | ||
| 121 | } | ||
| 122 | |||
| 106 | pub fn read(&mut self, buffer: &mut [u8]) -> Result<(), Error> { | 123 | pub fn read(&mut self, buffer: &mut [u8]) -> Result<(), Error> { |
| 107 | unsafe { | 124 | unsafe { |
| 108 | let r = self.inner.regs(); | 125 | let r = self.inner.regs(); |
diff --git a/embassy-stm32/stm32-data b/embassy-stm32/stm32-data | |||
| Subproject ad52937290a4027c80b6a9978ac742424e2e9ab | Subproject d10b30df80a4612ec2faaa0a7161b6a9dd731bf | ||
