1 /* 2 * Copyright (c) 2006-2021, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2020-06-27 AHTYDHD the first version 9 */ 10 11 #include <rtthread.h> 12 #include <rtdevice.h> 13 main(void)14int main(void) 15 { 16 int count = 1; 17 /* set LED0 pin mode to output */ 18 rt_pin_mode(2, PIN_MODE_OUTPUT); 19 20 while (count++) 21 { 22 rt_pin_write(2, PIN_HIGH); 23 rt_thread_mdelay(500); 24 rt_pin_write(2, PIN_LOW); 25 rt_thread_mdelay(500); 26 } 27 28 return RT_EOK; 29 } 30