diff options
| author | bigmagic <[email protected]> | 2020-10-27 13:18:24 +0800 |
|---|---|---|
| committer | bigmagic <[email protected]> | 2020-10-27 13:18:24 +0800 |
| commit | 8cf83694ae9395b738d0d4ac91e3e9b506a2c573 (patch) | |
| tree | 05ed87afd2c8944bae4a7011b6e917b1160c8200 /bsp/raspberry-pi | |
| parent | 3532ad3e3ad5712ab0c582a6635841ab8197110b (diff) | |
add actled biling
Diffstat (limited to 'bsp/raspberry-pi')
| -rw-r--r-- | bsp/raspberry-pi/raspi4-32/applications/main.c | 14 |
1 files changed, 13 insertions, 1 deletions
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 <rtdevice.h> #include <board.h> +#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; } |
