main.c 667 字节
Newer Older
1
/*
2
 * Copyright (c) 2021-2022, RT-Thread Development Team
3 4 5 6 7 8
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2022-04-24     supperthomas first version
9
 * 2022-06-02     supperthomas fix version
10 11
 */

12 13 14
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
15

16
int rtt_main(void)
17
{
T
tangzz98 已提交
18 19 20
    /* show RT-Thread version */
    rt_show_version();
    rt_kprintf("Hello!RT-THREAD!\r\n");
Thomas_Fly's avatar
Thomas_Fly 已提交
21
    rt_pin_mode(RT_BSP_LED_PIN, PIN_MODE_OUTPUT);
22 23
    while (1)
    {
Thomas_Fly's avatar
Thomas_Fly 已提交
24
        rt_pin_write(RT_BSP_LED_PIN, PIN_HIGH);
25
        rt_thread_mdelay(1000);
Thomas_Fly's avatar
Thomas_Fly 已提交
26
        rt_pin_write(RT_BSP_LED_PIN, PIN_LOW);
27 28 29
        rt_thread_mdelay(1000);
    }
}