summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-04-12 11:51:59 +0800
committerMeco Man <[email protected]>2021-04-12 11:51:59 +0800
commitf1d45a184a2131312cb931ff3d1a073eb13ea78e (patch)
tree1408f16346ba33410b9838e2b58fc2fd526921cc /bsp
parentb2f23f2a96a960db5464ee2a03cddda909b2c3a4 (diff)
优化main函数
Diffstat (limited to 'bsp')
-rw-r--r--bsp/bluetrum/ab32vg1-ab-prougen/applications/main.c14
1 files 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;
}