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  * 2021-10-02     spaceman           first version
9  */
10 
11 #include <rtdbg.h>
12 #include <stdio.h>
13 #include <rtthread.h>
14 #include <rtdevice.h>
15 #include "board.h"
16 #include "drv_gpio.h"
17 
18 
19 #define LED0_PIN    GET_PIN(B, 14)
20 #define LED1_PIN    GET_PIN(B, 15)
21 
22 
main(void)23 int main(void)
24 {
25     /* set LED pin mode to output */
26     rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
27     rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT);
28 
29     rt_pin_write(LED0_PIN, PIN_LOW);
30     rt_pin_write(LED1_PIN, PIN_LOW);
31 
32     while (1)
33     {
34         rt_pin_write(LED0_PIN, PIN_HIGH);
35         rt_thread_mdelay(500);
36         rt_pin_write(LED0_PIN, PIN_LOW);
37         rt_thread_mdelay(500);
38     }
39 
40     return RT_EOK;
41 }
42