1 /*
2  * Copyright (c) 2006-2023, 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  * 2023-03-05     yuanzihao    change the LED pins
10  */
11 
12 #include <stdio.h>
13 #include <rtthread.h>
14 #include <rtdevice.h>
15 #include <board.h>
16 
17 /* defined the LED1 pin: PE3 */
18 #define LED1_PIN GET_PIN(E, 3)
19 
main(void)20 int main(void)
21 {
22     int count = 1;
23 
24     /* set LED1 pin mode to output */
25     rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT);
26 
27     while (count++)
28     {
29         rt_pin_write(LED1_PIN, PIN_HIGH);
30         rt_thread_mdelay(500);
31         rt_pin_write(LED1_PIN, PIN_LOW);
32         rt_thread_mdelay(500);
33     }
34 
35     return RT_EOK;
36 }
37