1 /* 2 * Copyright (c) 2006-2025, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2024-03-11 Wangyuqiang first version 9 */ 10 11 #include <rtthread.h> 12 #include <rtdevice.h> 13 #include <board.h> 14 #include "hal_data.h" 15 16 #define LED_PIN_0 BSP_IO_PORT_14_PIN_3 /* Onboard LED pins */ 17 #define LED_PIN_1 BSP_IO_PORT_14_PIN_0 /* Onboard LED pins */ 18 #define LED_PIN_2 BSP_IO_PORT_14_PIN_1 /* Onboard LED pins */ 19 hal_entry(void)20void hal_entry(void) 21 { 22 rt_kprintf("\nHello RT-Thread!\n"); 23 24 while (1) 25 { 26 rt_pin_write(LED_PIN_0, PIN_HIGH); 27 rt_pin_write(LED_PIN_1, PIN_HIGH); 28 rt_pin_write(LED_PIN_2, PIN_HIGH); 29 rt_thread_mdelay(1000); 30 rt_pin_write(LED_PIN_0, PIN_LOW); 31 rt_pin_write(LED_PIN_1, PIN_LOW); 32 rt_pin_write(LED_PIN_2, PIN_LOW); 33 rt_thread_mdelay(1000); 34 } 35 }