zhyinch
2020-04-07 a185e714b1710025030317a1a32ad0ce660deef5
Src/ExternalDevices/led.h
@@ -6,19 +6,17 @@
#include "dw_app.h"
#if defined(NEWBOARD)  && defined(WORK_MODE_TAG)
#define LED0_PIN               GPIO_Pin_12
#define LED0_GPIO               GPIOB
#else
#define LED0_PIN               LED2_G_Pin
#define LED0_GPIO               GPIOA
#endif
#define LED_BLINK(...)            GPIO_Toggle(__VA_ARGS__)
#define LED0_BLINK               LED_BLINK(LED0_GPIO, LED0_PIN)
#define LED0_OFF                  GPIO_WriteBit(LED0_GPIO, LED0_PIN, Bit_RESET)
#define LED0_ON               GPIO_WriteBit(LED0_GPIO, LED0_PIN, Bit_SET)
#define LED0_OFF                  HAL_GPIO_WritePin(LED0_GPIO, LED0_PIN, GPIO_PIN_RESET)
#define LED0_ON               HAL_GPIO_WritePin(LED0_GPIO, LED0_PIN, GPIO_PIN_SET)
#define LED_LR_ON    HAL_GPIO_WritePin(LED2_R_GPIO_Port, LED2_R_Pin, GPIO_PIN_SET)
#define LED_LR_OFF   HAL_GPIO_WritePin(LED2_R_GPIO_Port, LED2_R_Pin, GPIO_PIN_RESET)
void Led_Init(void);
void GPIO_Toggle(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin);