i2c v1
This commit is contained in:
parent
aed8283cd5
commit
a9ec941dca
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,6 @@
|
||||
#![macro_use]
|
||||
|
||||
#[cfg_attr(feature = "_i2c_v1", path = "v1.rs")]
|
||||
#[cfg_attr(feature = "_i2c_v2", path = "v2.rs")]
|
||||
mod _version;
|
||||
pub use _version::*;
|
||||
@ -8,6 +9,9 @@ pub enum Error {
|
||||
Bus,
|
||||
Arbitration,
|
||||
Nack,
|
||||
Timeout,
|
||||
Crc,
|
||||
Overrun,
|
||||
}
|
||||
|
||||
pub(crate) mod sealed {
|
||||
|
405
embassy-stm32/src/i2c/v1.rs
Normal file
405
embassy-stm32/src/i2c/v1.rs
Normal file
@ -0,0 +1,405 @@
|
||||
use crate::gpio::AnyPin;
|
||||
use crate::gpio::Pin;
|
||||
use crate::i2c::{Error, Instance, SclPin, SdaPin};
|
||||
use crate::time::Hertz;
|
||||
use core::marker::PhantomData;
|
||||
use embassy::util::Unborrow;
|
||||
use embassy_extras::unborrow;
|
||||
use embedded_hal::blocking::i2c::Read;
|
||||
use embedded_hal::blocking::i2c::Write;
|
||||
use embedded_hal::blocking::i2c::WriteRead;
|
||||
|
||||
use crate::pac::i2c;
|
||||
use crate::pac::i2c::I2c as I2cTrait;
|
||||
use core::cmp;
|
||||
|
||||
use crate::pac::gpio::vals::{Afr, Moder, Ot};
|
||||
use crate::pac::gpio::Gpio;
|
||||
use crate::pac::regs::gpio_v1::vals::Cnf;
|
||||
use core::ops::Deref;
|
||||
|
||||
pub struct I2c<'d, T: Instance> {
|
||||
//peri: T,
|
||||
scl: AnyPin,
|
||||
sda: AnyPin,
|
||||
phantom: PhantomData<&'d mut T>,
|
||||
}
|
||||
|
||||
impl<'d, T: Instance> I2c<'d, T> {
|
||||
pub fn new<F>(
|
||||
pclk: Hertz,
|
||||
peri: impl Unborrow<Target = T> + 'd,
|
||||
scl: impl Unborrow<Target = impl SclPin<T>>,
|
||||
sda: impl Unborrow<Target = impl SdaPin<T>>,
|
||||
freq: F,
|
||||
) -> Self
|
||||
where
|
||||
F: Into<Hertz>,
|
||||
{
|
||||
unborrow!(peri);
|
||||
unborrow!(scl, sda);
|
||||
|
||||
unsafe {
|
||||
Self::configure_pin(scl.block(), scl.pin() as _, scl.af_num());
|
||||
Self::configure_pin(sda.block(), sda.pin() as _, sda.af_num());
|
||||
}
|
||||
|
||||
unsafe {
|
||||
T::regs().cr1().modify(|reg| {
|
||||
reg.set_pe(false);
|
||||
//reg.set_anfoff(false);
|
||||
});
|
||||
}
|
||||
|
||||
let timings = Timings::new(pclk, freq.into());
|
||||
|
||||
unsafe {
|
||||
T::regs().cr2().modify(|reg| {
|
||||
reg.set_freq(timings.freq);
|
||||
});
|
||||
T::regs().ccr().modify(|reg| {
|
||||
reg.set_f_s(timings.mode.f_s());
|
||||
reg.set_duty(timings.duty.duty());
|
||||
reg.set_ccr(timings.ccr);
|
||||
});
|
||||
T::regs().trise().modify(|reg| {
|
||||
reg.set_trise(timings.trise);
|
||||
});
|
||||
}
|
||||
|
||||
let scl = scl.degrade();
|
||||
let sda = sda.degrade();
|
||||
|
||||
unsafe {
|
||||
T::regs().cr1().modify(|reg| {
|
||||
reg.set_pe(true);
|
||||
});
|
||||
}
|
||||
|
||||
Self {
|
||||
scl,
|
||||
sda,
|
||||
phantom: PhantomData,
|
||||
}
|
||||
}
|
||||
|
||||
unsafe fn configure_pin(block: Gpio, pin: usize, af_num: u8) {
|
||||
let (afr, n_af) = if pin < 8 { (0, pin) } else { (1, pin - 8) };
|
||||
block.moder().modify(|w| w.set_moder(pin, Moder::ALTERNATE));
|
||||
block.afr(afr).modify(|w| w.set_afr(n_af, Afr(af_num)));
|
||||
block.otyper().modify(|w| w.set_ot(pin, Ot::OPENDRAIN));
|
||||
}
|
||||
|
||||
unsafe fn check_and_clear_error_flags(&self) -> Result<i2c::regs::Sr1, Error> {
|
||||
// Note that flags should only be cleared once they have been registered. If flags are
|
||||
// cleared otherwise, there may be an inherent race condition and flags may be missed.
|
||||
let sr1 = T::regs().sr1().read();
|
||||
|
||||
if sr1.timeout() {
|
||||
T::regs().sr1().modify(|reg| reg.set_timeout(false));
|
||||
return Err(Error::Timeout);
|
||||
}
|
||||
|
||||
if sr1.pecerr() {
|
||||
T::regs().sr1().modify(|reg| reg.set_pecerr(false));
|
||||
return Err(Error::Crc);
|
||||
}
|
||||
|
||||
if sr1.ovr() {
|
||||
T::regs().sr1().modify(|reg| reg.set_ovr(false));
|
||||
return Err(Error::Overrun);
|
||||
}
|
||||
|
||||
if sr1.af() {
|
||||
T::regs().sr1().modify(|reg| reg.set_af(false));
|
||||
return Err(Error::Nack);
|
||||
}
|
||||
|
||||
if sr1.arlo() {
|
||||
T::regs().sr1().modify(|reg| reg.set_arlo(false));
|
||||
return Err(Error::Arbitration);
|
||||
}
|
||||
|
||||
// The errata indicates that BERR may be incorrectly detected. It recommends ignoring and
|
||||
// clearing the BERR bit instead.
|
||||
if sr1.berr() {
|
||||
T::regs().sr1().modify(|reg| reg.set_berr(false));
|
||||
}
|
||||
|
||||
Ok(sr1)
|
||||
}
|
||||
|
||||
unsafe fn write_bytes(&mut self, addr: u8, bytes: &[u8]) -> Result<(), Error> {
|
||||
// Send a START condition
|
||||
|
||||
T::regs().cr1().modify(|reg| {
|
||||
reg.set_start(i2c::vals::Start::START);
|
||||
});
|
||||
|
||||
// Wait until START condition was generated
|
||||
while self.check_and_clear_error_flags()?.sb() == i2c::vals::Sb::NOSTART {}
|
||||
|
||||
// Also wait until signalled we're master and everything is waiting for us
|
||||
while {
|
||||
self.check_and_clear_error_flags()?;
|
||||
|
||||
let sr2 = T::regs().sr2().read();
|
||||
!sr2.msl() && !sr2.busy()
|
||||
} {}
|
||||
|
||||
// Set up current address, we're trying to talk to
|
||||
T::regs().dr().write(|reg| reg.set_dr(addr << 1));
|
||||
|
||||
// Wait until address was sent
|
||||
while {
|
||||
// Check for any I2C errors. If a NACK occurs, the ADDR bit will never be set.
|
||||
let sr1 = self.check_and_clear_error_flags()?;
|
||||
|
||||
// Wait for the address to be acknowledged
|
||||
!sr1.addr()
|
||||
} {}
|
||||
|
||||
// Clear condition by reading SR2
|
||||
let _ = T::regs().sr2().read();
|
||||
|
||||
// Send bytes
|
||||
for c in bytes {
|
||||
self.send_byte(*c)?;
|
||||
}
|
||||
|
||||
// Fallthrough is success
|
||||
Ok(())
|
||||
}
|
||||
|
||||
unsafe fn send_byte(&self, byte: u8) -> Result<(), Error> {
|
||||
// Wait until we're ready for sending
|
||||
while {
|
||||
// Check for any I2C errors. If a NACK occurs, the ADDR bit will never be set.
|
||||
!self.check_and_clear_error_flags()?.tx_e()
|
||||
} {}
|
||||
|
||||
// Push out a byte of data
|
||||
T::regs().dr().write(|reg| reg.set_dr(byte));
|
||||
|
||||
// Wait until byte is transferred
|
||||
while {
|
||||
// Check for any potential error conditions.
|
||||
!self.check_and_clear_error_flags()?.btf()
|
||||
} {}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
unsafe fn recv_byte(&self) -> Result<u8, Error> {
|
||||
while {
|
||||
// Check for any potential error conditions.
|
||||
self.check_and_clear_error_flags()?;
|
||||
|
||||
!T::regs().sr1().read().rx_ne()
|
||||
} {}
|
||||
|
||||
let value = T::regs().dr().read().dr();
|
||||
Ok(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'d, T: Instance> Read for I2c<'d, T> {
|
||||
type Error = Error;
|
||||
|
||||
fn read(&mut self, addr: u8, buffer: &mut [u8]) -> Result<(), Self::Error> {
|
||||
if let Some((last, buffer)) = buffer.split_last_mut() {
|
||||
// Send a START condition and set ACK bit
|
||||
unsafe {
|
||||
T::regs().cr1().modify(|reg| {
|
||||
reg.set_start(i2c::vals::Start::START);
|
||||
reg.set_ack(true);
|
||||
});
|
||||
}
|
||||
|
||||
// Wait until START condition was generated
|
||||
while unsafe { T::regs().sr1().read().sb() } == i2c::vals::Sb::NOSTART {}
|
||||
|
||||
// Also wait until signalled we're master and everything is waiting for us
|
||||
while {
|
||||
let sr2 = unsafe { T::regs().sr2().read() };
|
||||
!sr2.msl() && !sr2.busy()
|
||||
} {}
|
||||
|
||||
// Set up current address, we're trying to talk to
|
||||
unsafe {
|
||||
T::regs().dr().write(|reg| reg.set_dr((addr << 1) + 1));
|
||||
}
|
||||
|
||||
// Wait until address was sent
|
||||
while {
|
||||
unsafe {
|
||||
let sr1 = self.check_and_clear_error_flags()?;
|
||||
|
||||
// Wait for the address to be acknowledged
|
||||
!sr1.addr()
|
||||
}
|
||||
} {}
|
||||
|
||||
// Clear condition by reading SR2
|
||||
unsafe {
|
||||
let _ = T::regs().sr2().read();
|
||||
}
|
||||
|
||||
// Receive bytes into buffer
|
||||
for c in buffer {
|
||||
*c = unsafe { self.recv_byte()? };
|
||||
}
|
||||
|
||||
// Prepare to send NACK then STOP after next byte
|
||||
unsafe {
|
||||
T::regs().cr1().modify(|reg| {
|
||||
reg.set_ack(false);
|
||||
reg.set_stop(i2c::vals::Stop::STOP);
|
||||
});
|
||||
}
|
||||
|
||||
// Receive last byte
|
||||
*last = unsafe { self.recv_byte()? };
|
||||
|
||||
// Wait for the STOP to be sent.
|
||||
while { unsafe { T::regs().cr1().read().stop() == i2c::vals::Stop::STOP } } {}
|
||||
|
||||
// Fallthrough is success
|
||||
Ok(())
|
||||
} else {
|
||||
Err(Error::Overrun)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'d, T: Instance> Write for I2c<'d, T> {
|
||||
type Error = Error;
|
||||
|
||||
fn write(&mut self, addr: u8, bytes: &[u8]) -> Result<(), Self::Error> {
|
||||
unsafe {
|
||||
self.write_bytes(addr, bytes)?;
|
||||
// Send a STOP condition
|
||||
T::regs()
|
||||
.cr1()
|
||||
.modify(|reg| reg.set_stop(i2c::vals::Stop::STOP));
|
||||
// Wait for STOP condition to transmit.
|
||||
while { unsafe { T::regs().cr1().read().stop() == i2c::vals::Stop::STOP } } {}
|
||||
};
|
||||
|
||||
// Fallthrough is success
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
impl<'d, T: Instance> WriteRead for I2c<'d, T> {
|
||||
type Error = Error;
|
||||
|
||||
fn write_read(&mut self, addr: u8, bytes: &[u8], buffer: &mut [u8]) -> Result<(), Self::Error> {
|
||||
unsafe { self.write_bytes(addr, bytes)? };
|
||||
self.read(addr, buffer)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
enum Mode {
|
||||
Fast,
|
||||
Standard,
|
||||
}
|
||||
|
||||
impl Mode {
|
||||
fn f_s(&self) -> i2c::vals::FS {
|
||||
match self {
|
||||
Mode::Fast => i2c::vals::FS::FAST,
|
||||
Mode::Standard => i2c::vals::FS::STANDARD,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum Duty {
|
||||
Duty2_1,
|
||||
Duty16_9,
|
||||
}
|
||||
|
||||
impl Duty {
|
||||
fn duty(&self) -> i2c::vals::Duty {
|
||||
match self {
|
||||
Duty::Duty2_1 => i2c::vals::Duty::DUTY2_1,
|
||||
Duty::Duty16_9 => i2c::vals::Duty::DUTY16_9,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct Timings {
|
||||
freq: u8,
|
||||
mode: Mode,
|
||||
trise: u8,
|
||||
ccr: u16,
|
||||
duty: Duty,
|
||||
}
|
||||
|
||||
impl Timings {
|
||||
fn new(i2cclk: Hertz, speed: Hertz) -> Self {
|
||||
// Calculate settings for I2C speed modes
|
||||
let speed = speed.0;
|
||||
let clock = i2cclk.0;
|
||||
let freq = clock / 1_000_000;
|
||||
assert!(freq >= 2 && freq <= 50);
|
||||
|
||||
// Configure bus frequency into I2C peripheral
|
||||
//self.i2c.cr2.write(|w| unsafe { w.freq().bits(freq as u8) });
|
||||
|
||||
let trise = if speed <= 100_000 {
|
||||
freq + 1
|
||||
} else {
|
||||
(freq * 300) / 1000 + 1
|
||||
};
|
||||
|
||||
let mut ccr;
|
||||
let duty;
|
||||
let mode;
|
||||
|
||||
// I2C clock control calculation
|
||||
if speed <= 100_000 {
|
||||
duty = Duty::Duty2_1;
|
||||
mode = Mode::Standard;
|
||||
ccr = {
|
||||
let ccr = clock / (speed * 2);
|
||||
if ccr < 4 {
|
||||
4
|
||||
} else {
|
||||
ccr
|
||||
}
|
||||
};
|
||||
} else {
|
||||
const DUTYCYCLE: u8 = 0;
|
||||
mode = Mode::Fast;
|
||||
if DUTYCYCLE == 0 {
|
||||
duty = Duty::Duty2_1;
|
||||
ccr = clock / (speed * 3);
|
||||
ccr = if ccr < 1 { 1 } else { ccr };
|
||||
|
||||
// Set clock to fast mode with appropriate parameters for selected speed (2:1 duty cycle)
|
||||
} else {
|
||||
duty = Duty::Duty16_9;
|
||||
ccr = clock / (speed * 25);
|
||||
ccr = if ccr < 1 { 1 } else { ccr };
|
||||
|
||||
// Set clock to fast mode with appropriate parameters for selected speed (16:9 duty cycle)
|
||||
}
|
||||
}
|
||||
|
||||
Self {
|
||||
freq: freq as u8,
|
||||
trise: trise as u8,
|
||||
ccr: ccr as u16,
|
||||
duty,
|
||||
mode,
|
||||
//prescale: presc_reg,
|
||||
//scll,
|
||||
//sclh,
|
||||
//sdadel,
|
||||
//scldel,
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -126,6 +126,22 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
impl_spi!(SPI1, APB2);
|
||||
impl_spi_pin!(SPI1, SckPin, PA5, 5);
|
||||
@ -153,18 +169,6 @@ impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PD6, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -196,9 +200,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -209,8 +213,8 @@ embassy_extras::peripherals!(
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
|
||||
PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM2, TIM3,
|
||||
TIM4, TIM5, TIM9, USART1, USART2, USART6
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -126,6 +126,22 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
impl_spi!(SPI1, APB2);
|
||||
impl_spi_pin!(SPI1, SckPin, PA5, 5);
|
||||
@ -153,18 +169,6 @@ impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PD6, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -196,9 +200,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -209,8 +213,8 @@ embassy_extras::peripherals!(
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
|
||||
PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM2, TIM3,
|
||||
TIM4, TIM5, TIM9, USART1, USART2, USART6
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -126,6 +126,22 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
impl_spi!(SPI1, APB2);
|
||||
impl_spi_pin!(SPI1, SckPin, PA5, 5);
|
||||
@ -153,18 +169,6 @@ impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PD6, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -196,9 +200,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -209,8 +213,8 @@ embassy_extras::peripherals!(
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
|
||||
PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM2, TIM3,
|
||||
TIM4, TIM5, TIM9, USART1, USART2, USART6
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -126,6 +126,22 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
impl_spi!(SPI1, APB2);
|
||||
impl_spi_pin!(SPI1, SckPin, PA5, 5);
|
||||
@ -153,18 +169,6 @@ impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PD6, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -196,9 +200,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -209,8 +213,8 @@ embassy_extras::peripherals!(
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
|
||||
PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM2, TIM3,
|
||||
TIM4, TIM5, TIM9, USART1, USART2, USART6
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -126,6 +126,22 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
impl_spi!(SPI1, APB2);
|
||||
impl_spi_pin!(SPI1, SckPin, PA5, 5);
|
||||
@ -153,18 +169,6 @@ impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PD6, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -196,9 +200,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -209,8 +213,8 @@ embassy_extras::peripherals!(
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
|
||||
PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM2, TIM3,
|
||||
TIM4, TIM5, TIM9, USART1, USART2, USART6
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -126,6 +126,22 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
impl_spi!(SPI1, APB2);
|
||||
impl_spi_pin!(SPI1, SckPin, PA5, 5);
|
||||
@ -153,18 +169,6 @@ impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PD6, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -196,9 +200,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -209,8 +213,8 @@ embassy_extras::peripherals!(
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
|
||||
PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM2, TIM3,
|
||||
TIM4, TIM5, TIM9, USART1, USART2, USART6
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -126,6 +126,22 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
impl_spi!(SPI1, APB2);
|
||||
impl_spi_pin!(SPI1, SckPin, PA5, 5);
|
||||
@ -153,18 +169,6 @@ impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PD6, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -196,9 +200,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -209,8 +213,8 @@ embassy_extras::peripherals!(
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
|
||||
PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM2, TIM3,
|
||||
TIM4, TIM5, TIM9, USART1, USART2, USART6
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -126,6 +126,22 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
impl_spi!(SPI1, APB2);
|
||||
impl_spi_pin!(SPI1, SckPin, PA5, 5);
|
||||
@ -153,18 +169,6 @@ impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PD6, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -196,9 +200,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -209,8 +213,8 @@ embassy_extras::peripherals!(
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
|
||||
PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM2, TIM3,
|
||||
TIM4, TIM5, TIM9, USART1, USART2, USART6
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -126,6 +126,22 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
impl_spi!(SPI1, APB2);
|
||||
impl_spi_pin!(SPI1, SckPin, PA5, 5);
|
||||
@ -161,18 +177,6 @@ impl_spi_pin!(SPI4, SckPin, PE2, 5);
|
||||
impl_spi_pin!(SPI4, MisoPin, PE5, 5);
|
||||
impl_spi_pin!(SPI4, MosiPin, PE6, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -204,9 +208,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -217,8 +221,8 @@ embassy_extras::peripherals!(
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
|
||||
PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, TIM1, TIM10, TIM11, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM9, USART1, USART2, USART6
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1,
|
||||
USART2, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -126,6 +126,22 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
impl_spi!(SPI1, APB2);
|
||||
impl_spi_pin!(SPI1, SckPin, PA5, 5);
|
||||
@ -161,18 +177,6 @@ impl_spi_pin!(SPI4, SckPin, PE2, 5);
|
||||
impl_spi_pin!(SPI4, MisoPin, PE5, 5);
|
||||
impl_spi_pin!(SPI4, MosiPin, PE6, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -204,9 +208,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -217,8 +221,8 @@ embassy_extras::peripherals!(
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
|
||||
PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, TIM1, TIM10, TIM11, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM9, USART1, USART2, USART6
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1,
|
||||
USART2, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -126,6 +126,22 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
impl_spi!(SPI1, APB2);
|
||||
impl_spi_pin!(SPI1, SckPin, PA5, 5);
|
||||
@ -161,18 +177,6 @@ impl_spi_pin!(SPI4, SckPin, PE2, 5);
|
||||
impl_spi_pin!(SPI4, MisoPin, PE5, 5);
|
||||
impl_spi_pin!(SPI4, MosiPin, PE6, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -204,9 +208,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -217,8 +221,8 @@ embassy_extras::peripherals!(
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
|
||||
PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, TIM1, TIM10, TIM11, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM9, USART1, USART2, USART6
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1,
|
||||
USART2, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -126,6 +126,22 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
impl_spi!(SPI1, APB2);
|
||||
impl_spi_pin!(SPI1, SckPin, PA5, 5);
|
||||
@ -161,18 +177,6 @@ impl_spi_pin!(SPI4, SckPin, PE2, 5);
|
||||
impl_spi_pin!(SPI4, MisoPin, PE5, 5);
|
||||
impl_spi_pin!(SPI4, MosiPin, PE6, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -204,9 +208,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -217,8 +221,8 @@ embassy_extras::peripherals!(
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
|
||||
PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, TIM1, TIM10, TIM11, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM9, USART1, USART2, USART6
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1,
|
||||
USART2, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -92,15 +92,21 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x40080000 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -129,9 +135,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -140,8 +146,8 @@ embassy_extras::peripherals!(
|
||||
PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1,
|
||||
PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3,
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5,
|
||||
PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, TIM1, TIM11, TIM5, TIM6,
|
||||
TIM9, USART1, USART2, USART6
|
||||
PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, RNG, SYSCFG, USART1,
|
||||
USART2, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -92,15 +92,21 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x40080000 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -129,9 +135,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -140,8 +146,8 @@ embassy_extras::peripherals!(
|
||||
PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1,
|
||||
PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3,
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5,
|
||||
PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, TIM1, TIM11, TIM5, TIM6,
|
||||
TIM9, USART1, USART2, USART6
|
||||
PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, RNG, SYSCFG, USART1,
|
||||
USART2, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -92,15 +92,21 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x40080000 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -129,9 +135,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -140,8 +146,8 @@ embassy_extras::peripherals!(
|
||||
PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1,
|
||||
PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3,
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5,
|
||||
PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, TIM1, TIM11, TIM5, TIM6,
|
||||
TIM9, USART1, USART2, USART6
|
||||
PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, RNG, SYSCFG, USART1,
|
||||
USART2, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -92,15 +92,21 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x40080000 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -129,9 +135,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -140,8 +146,8 @@ embassy_extras::peripherals!(
|
||||
PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1,
|
||||
PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3,
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5,
|
||||
PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, TIM1, TIM11, TIM5, TIM6,
|
||||
TIM9, USART1, USART2, USART6
|
||||
PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, RNG, SYSCFG, USART1,
|
||||
USART2, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -92,15 +92,21 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x40080000 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -122,9 +128,9 @@ impl_usart_pin!(USART2, CkPin, PA4, 7);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -133,8 +139,8 @@ embassy_extras::peripherals!(
|
||||
PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1,
|
||||
PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3,
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5,
|
||||
PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, TIM1, TIM11, TIM5, TIM6,
|
||||
TIM9, USART1, USART2
|
||||
PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, RNG, SYSCFG, USART1,
|
||||
USART2
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -92,15 +92,21 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x40080000 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -122,9 +128,9 @@ impl_usart_pin!(USART2, CkPin, PA4, 7);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -133,8 +139,8 @@ embassy_extras::peripherals!(
|
||||
PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1,
|
||||
PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3,
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5,
|
||||
PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, TIM1, TIM11, TIM5, TIM6,
|
||||
TIM9, USART1, USART2
|
||||
PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, RNG, SYSCFG, USART1,
|
||||
USART2
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -126,6 +126,24 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
impl_spi!(SPI1, APB2);
|
||||
impl_spi_pin!(SPI1, SckPin, PA5, 5);
|
||||
@ -178,18 +196,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -223,9 +229,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -236,8 +242,8 @@ embassy_extras::peripherals!(
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
|
||||
PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM9, USART1, USART2, USART6
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG,
|
||||
USART1, USART2, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -126,6 +126,24 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
impl_spi!(SPI1, APB2);
|
||||
impl_spi_pin!(SPI1, SckPin, PA5, 5);
|
||||
@ -178,18 +196,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -223,9 +229,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -236,8 +242,8 @@ embassy_extras::peripherals!(
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
|
||||
PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM9, USART1, USART2, USART6
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG,
|
||||
USART1, USART2, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -126,6 +126,24 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
impl_spi!(SPI1, APB2);
|
||||
impl_spi_pin!(SPI1, SckPin, PA5, 5);
|
||||
@ -178,18 +196,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -223,9 +229,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -236,8 +242,8 @@ embassy_extras::peripherals!(
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
|
||||
PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM9, USART1, USART2, USART6
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG,
|
||||
USART1, USART2, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -126,6 +126,24 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
impl_spi!(SPI1, APB2);
|
||||
impl_spi_pin!(SPI1, SckPin, PA5, 5);
|
||||
@ -178,18 +196,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -223,9 +229,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -236,8 +242,8 @@ embassy_extras::peripherals!(
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
|
||||
PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM9, USART1, USART2, USART6
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG,
|
||||
USART1, USART2, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -126,6 +126,24 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
impl_spi!(SPI1, APB2);
|
||||
impl_spi_pin!(SPI1, SckPin, PA5, 5);
|
||||
@ -178,18 +196,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -223,9 +229,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -236,8 +242,8 @@ embassy_extras::peripherals!(
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
|
||||
PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM9, USART1, USART2, USART6
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG,
|
||||
USART1, USART2, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -126,6 +126,24 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
impl_spi!(SPI1, APB2);
|
||||
impl_spi_pin!(SPI1, SckPin, PA5, 5);
|
||||
@ -178,18 +196,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -223,9 +229,9 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -236,8 +242,8 @@ embassy_extras::peripherals!(
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
|
||||
PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7,
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9,
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM9, USART1, USART2, USART6
|
||||
PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG,
|
||||
USART1, USART2, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -92,6 +92,24 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -132,24 +150,6 @@ impl_spi_pin!(SPI5, MisoPin, PA12, 6);
|
||||
impl_spi_pin!(SPI5, SckPin, PB0, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PB8, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -189,10 +189,10 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -201,9 +201,8 @@ embassy_extras::peripherals!(
|
||||
PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1,
|
||||
PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3,
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5,
|
||||
PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5,
|
||||
SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8,
|
||||
TIM9, USART1, USART2, USART3, USART6
|
||||
PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2,
|
||||
SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -92,6 +92,24 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -132,24 +150,6 @@ impl_spi_pin!(SPI5, MisoPin, PA12, 6);
|
||||
impl_spi_pin!(SPI5, SckPin, PB0, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PB8, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -189,10 +189,10 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -201,9 +201,8 @@ embassy_extras::peripherals!(
|
||||
PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1,
|
||||
PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3,
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5,
|
||||
PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5,
|
||||
SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8,
|
||||
TIM9, USART1, USART2, USART3, USART6
|
||||
PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2,
|
||||
SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -109,6 +109,24 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -151,24 +169,6 @@ impl_spi_pin!(SPI5, MisoPin, PA12, 6);
|
||||
impl_spi_pin!(SPI5, SckPin, PB0, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PB8, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -218,10 +218,10 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -231,9 +231,8 @@ embassy_extras::peripherals!(
|
||||
PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3,
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
|
||||
PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7,
|
||||
PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1,
|
||||
TIM10, TIM11, TIM12, TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1,
|
||||
USART2, USART3, USART6
|
||||
PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4,
|
||||
SPI5, SYSCFG, USART1, USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -109,6 +109,24 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -151,24 +169,6 @@ impl_spi_pin!(SPI5, MisoPin, PA12, 6);
|
||||
impl_spi_pin!(SPI5, SckPin, PB0, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PB8, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -218,10 +218,10 @@ impl_usart_pin!(USART6, CkPin, PC8, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -231,9 +231,8 @@ embassy_extras::peripherals!(
|
||||
PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3,
|
||||
PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5,
|
||||
PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7,
|
||||
PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1,
|
||||
TIM10, TIM11, TIM12, TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1,
|
||||
USART2, USART3, USART6
|
||||
PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4,
|
||||
SPI5, SYSCFG, USART1, USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -160,6 +160,26 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -214,24 +234,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -288,10 +290,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -304,8 +306,8 @@ embassy_extras::peripherals!(
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12,
|
||||
TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1,
|
||||
USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -160,6 +160,26 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -214,24 +234,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -288,10 +290,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -304,8 +306,8 @@ embassy_extras::peripherals!(
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12,
|
||||
TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1,
|
||||
USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -160,6 +160,26 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -214,24 +234,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -288,10 +290,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -304,8 +306,8 @@ embassy_extras::peripherals!(
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12,
|
||||
TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1,
|
||||
USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -160,6 +160,26 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -214,24 +234,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -288,10 +290,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -304,8 +306,8 @@ embassy_extras::peripherals!(
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12,
|
||||
TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1,
|
||||
USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -160,6 +160,26 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -217,24 +237,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -275,10 +277,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -291,8 +293,8 @@ embassy_extras::peripherals!(
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12,
|
||||
TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART6
|
||||
PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1,
|
||||
USART2, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -160,6 +160,26 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -217,24 +237,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -275,10 +277,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -291,8 +293,8 @@ embassy_extras::peripherals!(
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12,
|
||||
TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART6
|
||||
PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1,
|
||||
USART2, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -160,6 +160,26 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -217,24 +237,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -291,10 +293,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -307,8 +309,8 @@ embassy_extras::peripherals!(
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12,
|
||||
TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1,
|
||||
USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -160,6 +160,26 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -217,24 +237,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -291,10 +293,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -307,8 +309,8 @@ embassy_extras::peripherals!(
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12,
|
||||
TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1,
|
||||
USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -160,6 +160,26 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -217,24 +237,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -291,10 +293,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -307,8 +309,8 @@ embassy_extras::peripherals!(
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12,
|
||||
TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1,
|
||||
USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -160,6 +160,26 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -217,24 +237,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -291,10 +293,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -307,8 +309,8 @@ embassy_extras::peripherals!(
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12,
|
||||
TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1,
|
||||
USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -160,6 +160,26 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -217,24 +237,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -291,10 +293,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -307,8 +309,8 @@ embassy_extras::peripherals!(
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12,
|
||||
TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1,
|
||||
USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -160,6 +160,26 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -217,24 +237,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -291,10 +293,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -307,8 +309,8 @@ embassy_extras::peripherals!(
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12,
|
||||
TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1,
|
||||
USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -160,6 +160,26 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -217,24 +237,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -291,10 +293,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -307,8 +309,8 @@ embassy_extras::peripherals!(
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12,
|
||||
TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1,
|
||||
USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -160,6 +160,26 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -217,24 +237,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -291,10 +293,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -307,8 +309,8 @@ embassy_extras::peripherals!(
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12,
|
||||
TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1,
|
||||
USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -177,6 +177,26 @@ impl_gpio_pin!(PI12, 8, 12, EXTI12);
|
||||
impl_gpio_pin!(PI13, 8, 13, EXTI13);
|
||||
impl_gpio_pin!(PI14, 8, 14, EXTI14);
|
||||
impl_gpio_pin!(PI15, 8, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -207,24 +227,6 @@ impl_spi_pin!(SPI3, SckPin, PC10, 6);
|
||||
impl_spi_pin!(SPI3, MisoPin, PC11, 6);
|
||||
impl_spi_pin!(SPI3, MosiPin, PC12, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -276,10 +278,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -293,8 +295,8 @@ embassy_extras::peripherals!(
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PI13, PI14, PI15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -160,6 +160,26 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -217,24 +237,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -275,10 +277,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -291,8 +293,8 @@ embassy_extras::peripherals!(
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12,
|
||||
TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART6
|
||||
PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1,
|
||||
USART2, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -160,6 +160,26 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -217,24 +237,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -291,10 +293,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -307,8 +309,8 @@ embassy_extras::peripherals!(
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12,
|
||||
TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1,
|
||||
USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -160,6 +160,26 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -217,24 +237,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -291,10 +293,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -307,8 +309,8 @@ embassy_extras::peripherals!(
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12,
|
||||
TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1,
|
||||
USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -160,6 +160,26 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -217,24 +237,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -291,10 +293,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -307,8 +309,8 @@ embassy_extras::peripherals!(
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12,
|
||||
TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1,
|
||||
USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -160,6 +160,26 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12);
|
||||
impl_gpio_pin!(PH13, 7, 13, EXTI13);
|
||||
impl_gpio_pin!(PH14, 7, 14, EXTI14);
|
||||
impl_gpio_pin!(PH15, 7, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB3, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB9, 9);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB4, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PB8, 9);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -217,24 +237,6 @@ impl_spi_pin!(SPI5, SckPin, PE2, 6);
|
||||
impl_spi_pin!(SPI5, MisoPin, PE5, 6);
|
||||
impl_spi_pin!(SPI5, MosiPin, PE6, 6);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -291,10 +293,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -307,8 +309,8 @@ embassy_extras::peripherals!(
|
||||
PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9,
|
||||
PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10,
|
||||
PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11,
|
||||
PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12,
|
||||
TIM13, TIM14, TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PH12, PH13, PH14, PH15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1,
|
||||
USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -259,24 +279,6 @@ impl_spi_pin!(SPI5, MosiPin, PF9, 5);
|
||||
impl_spi_pin!(SPI5, SckPin, PH6, 5);
|
||||
impl_spi_pin!(SPI5, MisoPin, PH7, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -328,10 +330,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -347,8 +349,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -259,24 +279,6 @@ impl_spi_pin!(SPI5, MosiPin, PF9, 5);
|
||||
impl_spi_pin!(SPI5, SckPin, PH6, 5);
|
||||
impl_spi_pin!(SPI5, MisoPin, PH7, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -328,10 +330,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -347,8 +349,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -264,24 +284,6 @@ impl_spi_pin!(SPI6, MisoPin, PG12, 5);
|
||||
impl_spi_pin!(SPI6, SckPin, PG13, 5);
|
||||
impl_spi_pin!(SPI6, MosiPin, PG14, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -333,10 +335,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -352,8 +354,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2,
|
||||
USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -264,24 +284,6 @@ impl_spi_pin!(SPI6, MisoPin, PG12, 5);
|
||||
impl_spi_pin!(SPI6, SckPin, PG13, 5);
|
||||
impl_spi_pin!(SPI6, MosiPin, PG14, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -333,10 +335,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -352,8 +354,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2,
|
||||
USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -251,24 +271,6 @@ impl_spi_pin!(SPI4, SckPin, PE2, 5);
|
||||
impl_spi_pin!(SPI4, MisoPin, PE5, 5);
|
||||
impl_spi_pin!(SPI4, MosiPin, PE6, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -320,10 +322,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -339,8 +341,7 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2, TIM3,
|
||||
TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -251,24 +271,6 @@ impl_spi_pin!(SPI4, SckPin, PE2, 5);
|
||||
impl_spi_pin!(SPI4, MisoPin, PE5, 5);
|
||||
impl_spi_pin!(SPI4, MosiPin, PE6, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -320,10 +322,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -339,8 +341,7 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2, TIM3,
|
||||
TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -264,24 +284,6 @@ impl_spi_pin!(SPI6, MisoPin, PG12, 5);
|
||||
impl_spi_pin!(SPI6, SckPin, PG13, 5);
|
||||
impl_spi_pin!(SPI6, MosiPin, PG14, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -333,10 +335,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -352,8 +354,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2,
|
||||
USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -264,24 +284,6 @@ impl_spi_pin!(SPI6, MisoPin, PG12, 5);
|
||||
impl_spi_pin!(SPI6, SckPin, PG13, 5);
|
||||
impl_spi_pin!(SPI6, MosiPin, PG14, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -333,10 +335,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -352,8 +354,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2,
|
||||
USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -259,24 +279,6 @@ impl_spi_pin!(SPI5, MosiPin, PF9, 5);
|
||||
impl_spi_pin!(SPI5, SckPin, PH6, 5);
|
||||
impl_spi_pin!(SPI5, MisoPin, PH7, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -328,10 +330,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -347,8 +349,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -259,24 +279,6 @@ impl_spi_pin!(SPI5, MosiPin, PF9, 5);
|
||||
impl_spi_pin!(SPI5, SckPin, PH6, 5);
|
||||
impl_spi_pin!(SPI5, MisoPin, PH7, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -328,10 +330,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -347,8 +349,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -264,24 +284,6 @@ impl_spi_pin!(SPI6, MisoPin, PG12, 5);
|
||||
impl_spi_pin!(SPI6, SckPin, PG13, 5);
|
||||
impl_spi_pin!(SPI6, MosiPin, PG14, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -333,10 +335,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -352,8 +354,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2,
|
||||
USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -264,24 +284,6 @@ impl_spi_pin!(SPI6, MisoPin, PG12, 5);
|
||||
impl_spi_pin!(SPI6, SckPin, PG13, 5);
|
||||
impl_spi_pin!(SPI6, MosiPin, PG14, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -333,10 +335,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -352,8 +354,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2,
|
||||
USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -264,24 +284,6 @@ impl_spi_pin!(SPI6, MisoPin, PG12, 5);
|
||||
impl_spi_pin!(SPI6, SckPin, PG13, 5);
|
||||
impl_spi_pin!(SPI6, MosiPin, PG14, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -333,10 +335,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -352,8 +354,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2,
|
||||
USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -264,24 +284,6 @@ impl_spi_pin!(SPI6, MisoPin, PG12, 5);
|
||||
impl_spi_pin!(SPI6, SckPin, PG13, 5);
|
||||
impl_spi_pin!(SPI6, MosiPin, PG14, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -333,10 +335,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -352,8 +354,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2,
|
||||
USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -264,24 +284,6 @@ impl_spi_pin!(SPI6, MisoPin, PG12, 5);
|
||||
impl_spi_pin!(SPI6, SckPin, PG13, 5);
|
||||
impl_spi_pin!(SPI6, MosiPin, PG14, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -333,10 +335,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -352,8 +354,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2,
|
||||
USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -264,24 +284,6 @@ impl_spi_pin!(SPI6, MisoPin, PG12, 5);
|
||||
impl_spi_pin!(SPI6, SckPin, PG13, 5);
|
||||
impl_spi_pin!(SPI6, MosiPin, PG14, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -333,10 +335,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -352,8 +354,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2,
|
||||
USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -264,24 +284,6 @@ impl_spi_pin!(SPI6, MisoPin, PG12, 5);
|
||||
impl_spi_pin!(SPI6, SckPin, PG13, 5);
|
||||
impl_spi_pin!(SPI6, MosiPin, PG14, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -333,10 +335,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -352,8 +354,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2,
|
||||
USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -264,24 +284,6 @@ impl_spi_pin!(SPI6, MisoPin, PG12, 5);
|
||||
impl_spi_pin!(SPI6, SckPin, PG13, 5);
|
||||
impl_spi_pin!(SPI6, MosiPin, PG14, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -333,10 +335,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -352,8 +354,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2,
|
||||
USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -264,24 +284,6 @@ impl_spi_pin!(SPI6, MisoPin, PG12, 5);
|
||||
impl_spi_pin!(SPI6, SckPin, PG13, 5);
|
||||
impl_spi_pin!(SPI6, MosiPin, PG14, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -333,10 +335,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -352,8 +354,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2,
|
||||
USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -251,24 +271,6 @@ impl_spi_pin!(SPI4, SckPin, PE2, 5);
|
||||
impl_spi_pin!(SPI4, MisoPin, PE5, 5);
|
||||
impl_spi_pin!(SPI4, MosiPin, PE6, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -320,10 +322,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -339,8 +341,7 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2, TIM3,
|
||||
TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -251,24 +271,6 @@ impl_spi_pin!(SPI4, SckPin, PE2, 5);
|
||||
impl_spi_pin!(SPI4, MisoPin, PE5, 5);
|
||||
impl_spi_pin!(SPI4, MosiPin, PE6, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -320,10 +322,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -339,8 +341,7 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2, TIM3,
|
||||
TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -251,24 +271,6 @@ impl_spi_pin!(SPI4, SckPin, PE2, 5);
|
||||
impl_spi_pin!(SPI4, MisoPin, PE5, 5);
|
||||
impl_spi_pin!(SPI4, MosiPin, PE6, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -320,10 +322,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -339,8 +341,7 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2, TIM3,
|
||||
TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -264,24 +284,6 @@ impl_spi_pin!(SPI6, MisoPin, PG12, 5);
|
||||
impl_spi_pin!(SPI6, SckPin, PG13, 5);
|
||||
impl_spi_pin!(SPI6, MosiPin, PG14, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -333,10 +335,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -352,8 +354,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2,
|
||||
USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -264,24 +284,6 @@ impl_spi_pin!(SPI6, MisoPin, PG12, 5);
|
||||
impl_spi_pin!(SPI6, SckPin, PG13, 5);
|
||||
impl_spi_pin!(SPI6, MosiPin, PG14, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -333,10 +335,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -352,8 +354,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2,
|
||||
USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -264,24 +284,6 @@ impl_spi_pin!(SPI6, MisoPin, PG12, 5);
|
||||
impl_spi_pin!(SPI6, SckPin, PG13, 5);
|
||||
impl_spi_pin!(SPI6, MosiPin, PG14, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -333,10 +335,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -352,8 +354,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2,
|
||||
USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -259,24 +279,6 @@ impl_spi_pin!(SPI5, MosiPin, PF9, 5);
|
||||
impl_spi_pin!(SPI5, SckPin, PH6, 5);
|
||||
impl_spi_pin!(SPI5, MisoPin, PH7, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -328,10 +330,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -347,8 +349,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14, TIM2,
|
||||
TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3,
|
||||
USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -264,24 +284,6 @@ impl_spi_pin!(SPI6, MisoPin, PG12, 5);
|
||||
impl_spi_pin!(SPI6, SckPin, PG13, 5);
|
||||
impl_spi_pin!(SPI6, MosiPin, PG14, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -333,10 +335,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -352,8 +354,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2,
|
||||
USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
|
||||
impl_gpio_pin!(PK13, 10, 13, EXTI13);
|
||||
impl_gpio_pin!(PK14, 10, 14, EXTI14);
|
||||
impl_gpio_pin!(PK15, 10, 15, EXTI15);
|
||||
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
|
||||
impl_i2c!(I2C1);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
|
||||
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
|
||||
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
|
||||
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
|
||||
impl_i2c!(I2C2);
|
||||
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
|
||||
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
|
||||
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
|
||||
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
|
||||
impl_i2c!(I2C3);
|
||||
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
|
||||
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
|
||||
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
|
||||
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
|
||||
impl_rng!(RNG, HASH_RNG);
|
||||
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
|
||||
@ -264,24 +284,6 @@ impl_spi_pin!(SPI6, MisoPin, PG12, 5);
|
||||
impl_spi_pin!(SPI6, SckPin, PG13, 5);
|
||||
impl_spi_pin!(SPI6, MosiPin, PG14, 5);
|
||||
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
|
||||
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
|
||||
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
|
||||
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
|
||||
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
|
||||
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
|
||||
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
|
||||
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
|
||||
impl_timer!(TIM2);
|
||||
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
|
||||
impl_timer!(TIM3);
|
||||
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
|
||||
impl_timer!(TIM4);
|
||||
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
|
||||
impl_timer!(TIM5);
|
||||
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
|
||||
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
|
||||
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
|
||||
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
|
||||
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
|
||||
impl_usart!(USART1);
|
||||
impl_usart_pin!(USART1, RxPin, PA10, 7);
|
||||
@ -333,10 +335,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
|
||||
pub use super::regs::dma_v2 as dma;
|
||||
pub use super::regs::exti_v1 as exti;
|
||||
pub use super::regs::gpio_v2 as gpio;
|
||||
pub use super::regs::i2c_v1 as i2c;
|
||||
pub use super::regs::rng_v1 as rng;
|
||||
pub use super::regs::spi_v1 as spi;
|
||||
pub use super::regs::syscfg_f4 as syscfg;
|
||||
pub use super::regs::timer_v1 as timer;
|
||||
pub use super::regs::usart_v1 as usart;
|
||||
embassy_extras::peripherals!(
|
||||
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
|
||||
@ -352,8 +354,8 @@ embassy_extras::peripherals!(
|
||||
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
|
||||
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
|
||||
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
|
||||
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14,
|
||||
TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
|
||||
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2,
|
||||
USART3, USART6
|
||||
);
|
||||
pub fn DMA(n: u8) -> dma::Dma {
|
||||
match n {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user