Created
July 3, 2019 03:34
-
-
Save surinoel/4c4b8af1b8bb3676ae88fd2858a2cebd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "gpio.h" | |
#include "stm32f4xx_hal.h" | |
#include "stm32f4xx_hal_gpio.h" | |
void on_green_led(void) | |
{ | |
HAL_GPIO_WritePin(GPIOG, GPIO_PIN_13, GPIO_PIN_SET); | |
} | |
void off_green_led(void) | |
{ | |
HAL_GPIO_WritePin(GPIOG, GPIO_PIN_13, GPIO_PIN_RESET); | |
} | |
void blink_green_led(void) | |
{ | |
on_green_led(); | |
HAL_Delay(500); | |
off_green_led(); | |
HAL_Delay(500); | |
} | |
void on_red_led(void) | |
{ | |
HAL_GPIO_WritePin(GPIOG, GPIO_PIN_14, GPIO_PIN_SET); | |
} | |
void off_red_led(void) | |
{ | |
HAL_GPIO_WritePin(GPIOG, GPIO_PIN_14, GPIO_PIN_RESET); | |
} | |
void blink_red_led(void) | |
{ | |
on_red_led(); | |
HAL_Delay(500); | |
off_red_led(); | |
HAL_Delay(500); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment