1 /* 2 * Copyright (c) 2023, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2023-07-06 Supperthomas first version 9 * 2023-12-03 Meco Man support nano version 10 */ 11 12 #include <board.h> 13 #include <rtthread.h> 14 #include <drv_gpio.h> 15 #ifndef RT_USING_NANO 16 #include <rtdevice.h> 17 #endif /* RT_USING_NANO */ 18 19 #define GPIO_LED_B GET_PIN(F, 11) 20 #define GPIO_LED_R GET_PIN(F, 12) main(void)21int main(void) 22 { 23 rt_pin_mode(GPIO_LED_R, PIN_MODE_OUTPUT); 24 25 while (1) 26 { 27 rt_pin_write(GPIO_LED_R, PIN_HIGH); 28 rt_thread_mdelay(500); 29 rt_pin_write(GPIO_LED_R, PIN_LOW); 30 rt_thread_mdelay(500); 31 } 32 } 33