Mercurial > pub > halpp
diff l476rg/Src/gpio.c @ 2:0c59e7a7782a
Working on GPIO and RCC
author | cin |
---|---|
date | Mon, 16 Jan 2017 11:04:47 +0300 |
parents | 32a3b1785697 |
children |
line wrap: on
line diff
--- a/l476rg/Src/gpio.c Fri Jan 13 02:11:02 2017 +0300 +++ b/l476rg/Src/gpio.c Mon Jan 16 11:04:47 2017 +0300 @@ -69,6 +69,16 @@ GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(B1_GPIO_Port, &GPIO_InitStruct); + /*Configure GPIO pin : PA5 */ + GPIO_InitStruct.Pin = GPIO_PIN_5; + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + + /*Configure GPIO pin Output Level */ + HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_RESET); + } /* USER CODE BEGIN 2 */