micropython/ports/stm32/boards/STM32F7DISC/board_init.c
Damien George 3eb0694b97 stm32: Update HAL macro and constant names to use newer versions.
Newer versions of the HAL use names which are cleaner and more
self-consistent amongst the HAL itself.  This patch switches to use those
names in most places so it is easier to update the HAL in the future.
2018-02-13 15:37:35 +11:00

16 lines
490 B
C

#include STM32_HAL_H
void STM32F7DISC_board_early_init(void) {
GPIO_InitTypeDef GPIO_InitStructure;
__HAL_RCC_GPIOK_CLK_ENABLE();
// Turn off the backlight. LCD_BL_CTRL = PK3
GPIO_InitStructure.Pin = GPIO_PIN_3;
GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStructure.Pull = GPIO_PULLUP;
GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
HAL_GPIO_Init(GPIOK, &GPIO_InitStructure);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_3, GPIO_PIN_RESET);
}