zhyinch
2019-11-05 a58107e9dcf49b7bf0b31cf201d29069550fd6cd
源码/核心板/Src/ExternalDevices/led.h
@@ -6,18 +6,22 @@
#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               GPIO_Pin_2
#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 LED1_PIN               GPIO_Pin_1
#define LED1_GPIO               GPIOA
#define LED_BLINK(...)            GPIO_Toggle(__VA_ARGS__)
#define LED1_BLINK               LED_BLINK(LED1_GPIO, LED1_PIN)
#define LED1_OFF                  GPIO_WriteBit(LED1_GPIO, LED1_PIN, Bit_RESET)
#define LED1_ON               GPIO_WriteBit(LED1_GPIO, LED1_PIN, Bit_SET)
void Led_Init(void);
void GPIO_Toggle(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin);