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-05 thread-liu first version 9 */ 10 11 #include <rtthread.h> 12 #include <board.h> 13 14 /* defined the LD4 pin: PD8 */ 15 #define LED4_PIN GET_PIN(D, 8) 16 main(void)17int main(void) 18 { 19 /* set LD8 pin mode to output */ 20 rt_pin_mode(LED4_PIN, PIN_MODE_OUTPUT); 21 22 while (1) 23 { 24 rt_pin_write(LED4_PIN, PIN_HIGH); 25 rt_thread_mdelay(500); 26 rt_pin_write(LED4_PIN, PIN_LOW); 27 rt_thread_mdelay(500); 28 } 29 } 30