mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-12-17 05:39:57 +01:00
stm32: Add comments to configuration of OSPEEDR gpio speed
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -102,6 +102,8 @@ gpio_clock_enable(GPIO_TypeDef *regs)
|
||||
enable_pclock((uint32_t)regs);
|
||||
}
|
||||
|
||||
#define STM_OSPEED 0x2 // ~85Mhz at 50pF
|
||||
|
||||
// Set the mode and extended function of a pin
|
||||
void
|
||||
gpio_peripheral(uint32_t gpio, uint32_t mode, int pullup)
|
||||
@@ -122,7 +124,7 @@ gpio_peripheral(uint32_t gpio, uint32_t mode, int pullup)
|
||||
regs->MODER = (regs->MODER & ~m_msk) | (mode_bits << m_shift);
|
||||
regs->PUPDR = (regs->PUPDR & ~m_msk) | (pup << m_shift);
|
||||
regs->OTYPER = (regs->OTYPER & ~(1 << pos)) | (od << pos);
|
||||
regs->OSPEEDR = (regs->OSPEEDR & ~m_msk) | (0x02 << m_shift);
|
||||
regs->OSPEEDR = (regs->OSPEEDR & ~m_msk) | (STM_OSPEED << m_shift);
|
||||
}
|
||||
|
||||
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
|
||||
|
||||
Reference in New Issue
Block a user