stm32: Fix the GPIO register for stm32h7 (#5077)

Signed-off-by: Aaron DeLyser <bluwolf@gmail.com>
This commit is contained in:
adelyser 2021-12-29 16:01:28 -07:00 committed by GitHub
parent 98af5dffe6
commit 9bdd61758e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -100,9 +100,9 @@ get_pclock_frequency(uint32_t periph_base)
void
gpio_clock_enable(GPIO_TypeDef *regs)
{
uint32_t pos = ((uint32_t)regs - D3_APB1PERIPH_BASE) / 0x400;
RCC->APB4ENR |= (1<<pos);
RCC->APB4ENR;
uint32_t pos = ((uint32_t)regs - D3_AHB1PERIPH_BASE) / 0x400;
RCC->AHB4ENR |= (1<<pos);
RCC->AHB4ENR;
}
#if !CONFIG_STM32_CLOCK_REF_INTERNAL