mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-24 22:13:52 +01:00
cpu/stm32/periph/usbdev_fs: conditional configuration of CRS
Conditional configuration of CRS_CR_AUTOTRIMEN allows the compilation of the driver for STM32 MCUs that don't have Clock Recovery System.
This commit is contained in:
parent
66d0f948ba
commit
20bdd3452e
@ -138,8 +138,11 @@ static void _enable_usb_clk(void)
|
||||
#elif defined(RCC_APB1SMENR1_USBSMEN)
|
||||
RCC->APB1SMENR1 |= RCC_APB1SMENR1_USBSMEN;
|
||||
#endif
|
||||
|
||||
#if defined(CRS_CR_AUTOTRIMEN) && defined(CRS_CR_CEN)
|
||||
/* Enable CRS with auto trim enabled */
|
||||
CRS->CR |= (CRS_CR_AUTOTRIMEN | CRS_CR_CEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void _enable_gpio(const stm32_usbdev_fs_config_t *conf)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user