From 1560ba22c98a3ddb13710d3592e20eeea8af7616 Mon Sep 17 00:00:00 2001 From: zhyinch <zhyinch@gmail.com> Date: 星期六, 04 四月 2020 20:19:40 +0800 Subject: [PATCH] 测距快完成,有bug,DW无法测距 --- Src/ExternalDevices/led.h | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Src/ExternalDevices/led.h b/Src/ExternalDevices/led.h index 5ed3ea4..06512dd 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 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