From a185e714b1710025030317a1a32ad0ce660deef5 Mon Sep 17 00:00:00 2001 From: zhyinch <zhyinch@gmail.com> Date: 星期二, 07 四月 2020 22:25:05 +0800 Subject: [PATCH] 标签低功耗完成,完成部分测距功能 --- Src/ExternalDevices/led.h | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Src/ExternalDevices/led.h b/Src/ExternalDevices/led.h index 5ed3ea4..b02a94f 100644 --- a/Src/ExternalDevices/led.h +++ b/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); -- Gitblit v1.9.3