1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +03:00

[H7][F7] Add unused pin handling

This commit is contained in:
jflyper 2020-01-21 12:19:37 +09:00
parent a88d5470eb
commit 76288b6ce6
3 changed files with 2 additions and 41 deletions

View file

@ -135,24 +135,6 @@ void enableGPIOPowerUsageAndNoiseReductions(void)
#ifndef STM32F722xx #ifndef STM32F722xx
__HAL_RCC_SPI6_CLK_ENABLE(); __HAL_RCC_SPI6_CLK_ENABLE();
#endif #endif
//
// GPIO_InitTypeDef GPIO_InitStructure;
// GPIO_StructInit(&GPIO_InitStructure);
// GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; // default is un-pulled input
//
// GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
// GPIO_InitStructure.GPIO_Pin &= ~(GPIO_Pin_11 | GPIO_Pin_12); // leave USB D+/D- alone
//
// GPIO_InitStructure.GPIO_Pin &= ~(GPIO_Pin_13 | GPIO_Pin_14); // leave JTAG pins alone
// GPIO_Init(GPIOA, &GPIO_InitStructure);
//
// GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
// GPIO_Init(GPIOB, &GPIO_InitStructure);
//
// GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
// GPIO_Init(GPIOC, &GPIO_InitStructure);
// GPIO_Init(GPIOD, &GPIO_InitStructure);
// GPIO_Init(GPIOE, &GPIO_InitStructure);
} }
bool isMPUSoftReset(void) bool isMPUSoftReset(void)

View file

@ -118,29 +118,6 @@ void enablePeripherialClocks(void)
void enableGPIOPowerUsageAndNoiseReductions(void) void enableGPIOPowerUsageAndNoiseReductions(void)
{ {
// GPIO initialization, copied from drivers/system_stm32f7xx.c
// ... It was commented out.
// Where does F7 initializes the GPIO pins? It doesn't do it at all???
//
// GPIO_InitTypeDef GPIO_InitStructure;
// GPIO_StructInit(&GPIO_InitStructure);
// GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; // default is un-pulled input
//
// GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
// GPIO_InitStructure.GPIO_Pin &= ~(GPIO_Pin_11 | GPIO_Pin_12); // leave USB D+/D- alone
//
// GPIO_InitStructure.GPIO_Pin &= ~(GPIO_Pin_13 | GPIO_Pin_14); // leave JTAG pins alone
// GPIO_Init(GPIOA, &GPIO_InitStructure);
//
// GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
// GPIO_Init(GPIOB, &GPIO_InitStructure);
//
// GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
// GPIO_Init(GPIOC, &GPIO_InitStructure);
// GPIO_Init(GPIOD, &GPIO_InitStructure);
// GPIO_Init(GPIOE, &GPIO_InitStructure);
} }
void configureMasterClockOutputs(void) void configureMasterClockOutputs(void)

View file

@ -1006,6 +1006,8 @@ void init(void)
motorEnable(); motorEnable();
#endif #endif
initializeUnusedPins();
tasksInit(); tasksInit();
systemState |= SYSTEM_STATE_READY; systemState |= SYSTEM_STATE_READY;