ports/stm32/boards/STM32F7DISC/board_init.c
raw| 1 | #include STM32_HAL_H |
| 2 | |
| 3 | void STM32F7DISC_board_early_init(void) { |
| 4 | GPIO_InitTypeDef GPIO_InitStructure; |
| 5 | |
| 6 | __HAL_RCC_GPIOK_CLK_ENABLE(); |
| 7 | |
| 8 | // Turn off the backlight. LCD_BL_CTRL = PK3 |
| 9 | GPIO_InitStructure.Pin = GPIO_PIN_3; |
| 10 | GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP; |
| 11 | GPIO_InitStructure.Pull = GPIO_PULLUP; |
| 12 | GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_VERY_HIGH; |
| 13 | HAL_GPIO_Init(GPIOK, &GPIO_InitStructure); |
| 14 | HAL_GPIO_WritePin(GPIOK, GPIO_PIN_3, GPIO_PIN_RESET); |
| 15 | } |