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 * 2018-11-06 SummerGift first version 9 * 2019-10-19 xuzhuoyi add stm32f429-st-disco bsp 10 * 2023-12-03 Meco Man support nano version 11 */ 12 13 #include <board.h> 14 #include <rtthread.h> 15 #include <drv_gpio.h> 16 #ifndef RT_USING_NANO 17 #include <rtdevice.h> 18 #endif /* RT_USING_NANO */ 19 20 /* defined the LED1 pin: PG13 */ 21 #define LED1_PIN GET_PIN(G, 13) 22 main(void)23int main(void) 24 { 25 /* set LED1 pin mode to output */ 26 rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT); 27 28 while (1) 29 { 30 rt_pin_write(LED1_PIN, PIN_HIGH); 31 rt_thread_mdelay(500); 32 rt_pin_write(LED1_PIN, PIN_LOW); 33 rt_thread_mdelay(500); 34 } 35 } 36