From 8cf83694ae9395b738d0d4ac91e3e9b506a2c573 Mon Sep 17 00:00:00 2001 From: bigmagic Date: Tue, 27 Oct 2020 13:18:24 +0800 Subject: [PATCH] add actled biling --- bsp/raspberry-pi/raspi4-32/applications/main.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/bsp/raspberry-pi/raspi4-32/applications/main.c b/bsp/raspberry-pi/raspi4-32/applications/main.c index 9664e67d01..15dc74dc58 100644 --- a/bsp/raspberry-pi/raspi4-32/applications/main.c +++ b/bsp/raspberry-pi/raspi4-32/applications/main.c @@ -12,8 +12,20 @@ #include #include +#define ACTLED (42) + int main(int argc, char** argv) { rt_kprintf("Hi, this is RT-Thread!!\n"); - return 0; + + rt_pin_mode(ACTLED, PIN_MODE_OUTPUT); + + while(1) + { + rt_pin_write(ACTLED, PIN_HIGH); + rt_thread_mdelay(1000); + rt_pin_write(ACTLED, PIN_LOW); + rt_thread_mdelay(1000); + } + return RT_EOK; }