mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
reformat I2C driver and align comments. add timeout checking and move hardware reinit common code into separate function.
moved nvic priority group init into drv_system, where it belongs Conflicts: src/drivers/system_common.c src/drv_i2c.c
This commit is contained in:
parent
31297de7fa
commit
0e80dbf025
2 changed files with 134 additions and 136 deletions
|
@ -102,6 +102,9 @@ void systemInit(bool overclock)
|
|||
SetSysClock(overclock);
|
||||
#endif
|
||||
|
||||
// Configure NVIC preempt/priority groups
|
||||
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
|
||||
|
||||
// Turn on clocks for stuff we use
|
||||
#ifdef STM32F10X_MD
|
||||
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2 | RCC_APB1Periph_TIM3 | RCC_APB1Periph_TIM4 | RCC_APB1Periph_I2C2, ENABLE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue