main.c 611 字节
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
{
Thomas_Fly's avatar
Thomas_Fly 已提交
18
    rt_pin_mode(RT_BSP_LED_PIN, PIN_MODE_OUTPUT);
19 20
    while (1)
    {
21
        printf("Hello!RT-THREAD!\r\n");
Thomas_Fly's avatar
Thomas_Fly 已提交
22
        rt_pin_write(RT_BSP_LED_PIN, PIN_HIGH);
23
        rt_thread_mdelay(1000);
Thomas_Fly's avatar
Thomas_Fly 已提交
24
        rt_pin_write(RT_BSP_LED_PIN, PIN_LOW);
25 26 27
        rt_thread_mdelay(1000);
    }
}