aboutsummaryrefslogblamecommitdiff
path: root/include/stm-led.h
blob: bd2a1e38a9f52e4f1a3c43e2edf19fae96858756 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                             
#ifndef __STM_LED_H
#define __STM_LED_H

#include "stm32f4xx_hal.h"

#define LED_PORT        GPIOJ
#define LED_RED         GPIO_PIN_1
#define LED_YELLOW      GPIO_PIN_2
#define LED_GREEN       GPIO_PIN_3
#define LED_BLUE        GPIO_PIN_4

#define led_on(pin)     HAL_GPIO_WritePin(LED_PORT,pin,SET)
#define led_off(pin)    HAL_GPIO_WritePin(LED_PORT,pin,RESET)
#define led_toggle(pin) HAL_GPIO_TogglePin(LED_PORT,pin)

#endif /* __STM_LED_H */