main.c 621 字节
Newer Older
Z
zohar123 已提交
1 2 3 4 5 6 7 8 9 10 11 12
/*
 * Copyright (c) 2006-2018, Synwit Technology Co.,Ltd.
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2018-12-10     Zohar_Lee    first version
 */

#include <rtthread.h>
#include <rtdevice.h>
13 14
/* defined the LED pin: PA12 */
#define LED_PIN    100
Z
zohar123 已提交
15 16 17

int main(void)
{
18 19 20 21 22
    int count = 1;
    /* set LED4 pin mode to output */
    rt_pin_mode(LED_PIN, PIN_MODE_OUTPUT);

    while (count++)
Z
zohar123 已提交
23
    {
24 25 26 27
        rt_pin_write(LED_PIN, PIN_HIGH);
        rt_thread_mdelay(500);
        rt_pin_write(LED_PIN, PIN_LOW);
        rt_thread_mdelay(500);
Z
zohar123 已提交
28 29
    }

30
    return RT_EOK;
Z
zohar123 已提交
31
}