partial alternate function configuration on STM32f1
This commit is contained in:
@ -10,7 +10,7 @@ use embassy_net::{Device, DeviceCapabilities, LinkState, PacketBuf, MTU};
|
||||
|
||||
use crate::gpio::sealed::Pin as __GpioPin;
|
||||
use crate::gpio::Pin as GpioPin;
|
||||
use crate::gpio::{sealed::OutputType::PushPull, AnyPin};
|
||||
use crate::gpio::{sealed::AFType::OutputPushPull, AnyPin};
|
||||
use crate::pac::gpio::vals::Ospeedr;
|
||||
use crate::pac::{ETH, RCC, SYSCFG};
|
||||
use crate::peripherals;
|
||||
@ -416,7 +416,7 @@ macro_rules! impl_pin {
|
||||
fn configure(&mut self) {
|
||||
// NOTE(unsafe) Exclusive access to the registers
|
||||
critical_section::with(|_| unsafe {
|
||||
self.set_as_af($af, PushPull);
|
||||
self.set_as_af($af, OutputPushPull);
|
||||
self.block()
|
||||
.ospeedr()
|
||||
.modify(|w| w.set_ospeedr(self.pin() as usize, Ospeedr::VERYHIGHSPEED));
|
||||
|
Reference in New Issue
Block a user