diff options
author | Dave Hylands <dhylands@gmail.com> | 2015-07-28 11:13:33 -0700 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-07-30 00:38:32 +0100 |
commit | 92d4b51ad5d828930334f87d9619a78b5877a384 (patch) | |
tree | b055ba812bfce720130c6c52272bde38e80a00c9 /stmhal/boards/STM32F7DISC/board_init.c | |
parent | 7e7fb0b7a3d716062281c2366de97a41a1ea87c1 (diff) |
stmhal: Add STM32F7DISC and associated changes.
Diffstat (limited to 'stmhal/boards/STM32F7DISC/board_init.c')
-rw-r--r-- | stmhal/boards/STM32F7DISC/board_init.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/stmhal/boards/STM32F7DISC/board_init.c b/stmhal/boards/STM32F7DISC/board_init.c new file mode 100644 index 000000000..4530a4706 --- /dev/null +++ b/stmhal/boards/STM32F7DISC/board_init.c @@ -0,0 +1,15 @@ +#include STM32_HAL_H + +void STM32F7DISC_board_early_init(void) { + GPIO_InitTypeDef GPIO_InitStructure; + + __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_HIGH; + HAL_GPIO_Init(GPIOK, &GPIO_InitStructure); + HAL_GPIO_WritePin(GPIOK, GPIO_PIN_3, GPIO_PIN_RESET); +} |