1 /* 2 * Copyright (c) 2006-2024 RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2021-08-20 BruceOu first implementation 9 */ 10 11 #include <stdio.h> 12 #include <rtthread.h> 13 #include <rtdevice.h> 14 #include <board.h> 15 16 /* defined the LED1 pin: PC0 */ 17 #define LED1_PIN GET_PIN(C, 0) 18 main(void)19int main(void) 20 { 21 int count = 1; 22 23 /* set LED1 pin mode to output */ 24 rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT); 25 26 while (count++) 27 { 28 rt_pin_write(LED1_PIN, PIN_HIGH); 29 rt_thread_mdelay(500); 30 rt_pin_write(LED1_PIN, PIN_LOW); 31 rt_thread_mdelay(500); 32 } 33 34 return RT_EOK; 35 } 36