From f1d45a184a2131312cb931ff3d1a073eb13ea78e Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Mon, 12 Apr 2021 11:51:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96main=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ab32vg1-ab-prougen/applications/main.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/bsp/bluetrum/ab32vg1-ab-prougen/applications/main.c b/bsp/bluetrum/ab32vg1-ab-prougen/applications/main.c index 9fa2a7204e..dc043f56e1 100644 --- a/bsp/bluetrum/ab32vg1-ab-prougen/applications/main.c +++ b/bsp/bluetrum/ab32vg1-ab-prougen/applications/main.c @@ -19,7 +19,6 @@ int main(void) { - uint32_t cnt = 0; uint8_t pin = rt_pin_get("PE.1"); rt_pin_mode(pin, PIN_MODE_OUTPUT); @@ -27,14 +26,9 @@ int main(void) while (1) { - if (cnt % 2 == 0) { - rt_pin_write(pin, PIN_LOW); - } else { - rt_pin_write(pin, PIN_HIGH); - } - cnt++; - rt_thread_mdelay(1000); + rt_pin_write(pin, PIN_LOW); + rt_thread_mdelay(500); + rt_pin_write(pin, PIN_HIGH); + rt_thread_mdelay(500); } - - return 0; }