Skip to content

Commit 8cf8369

Browse files
committed
add actled biling
1 parent 3532ad3 commit 8cf8369

File tree

1 file changed

+13
-1
lines changed
  • bsp/raspberry-pi/raspi4-32/applications

1 file changed

+13
-1
lines changed

bsp/raspberry-pi/raspi4-32/applications/main.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,20 @@
1212
#include <rtdevice.h>
1313
#include <board.h>
1414

15+
#define ACTLED (42)
16+
1517
int main(int argc, char** argv)
1618
{
1719
rt_kprintf("Hi, this is RT-Thread!!\n");
18-
return 0;
20+
21+
rt_pin_mode(ACTLED, PIN_MODE_OUTPUT);
22+
23+
while(1)
24+
{
25+
rt_pin_write(ACTLED, PIN_HIGH);
26+
rt_thread_mdelay(1000);
27+
rt_pin_write(ACTLED, PIN_LOW);
28+
rt_thread_mdelay(1000);
29+
}
30+
return RT_EOK;
1931
}

0 commit comments

Comments
 (0)