summaryrefslogtreecommitdiff
path: root/bsp/acm32/acm32f0x0-nucleo/applications/main.c
blob: aa93e7d728b996d0c3d042dbd5691e0f5bd36411 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 * Copyright (c) 2006-2022, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2021-08-23     AisinoChip   the first version
 * 2021-10-17     AisinoChip   remove unused header file
 */
#include "board.h"
#include <drivers/dev_pin.h>

#define LED_PIN_NUM    1     /* PA1 */

int main(void)
{
    rt_pin_mode(LED_PIN_NUM, PIN_MODE_OUTPUT);

    while (1)
    {
        rt_pin_write(LED_PIN_NUM, PIN_LOW);
        rt_thread_delay(RT_TICK_PER_SECOND / 2);
        rt_pin_write(LED_PIN_NUM, PIN_HIGH);
        rt_thread_delay(RT_TICK_PER_SECOND / 2);
    }
}