summaryrefslogtreecommitdiff
path: root/bsp/fm33lc026/applications/main.c
blob: 1d8b1905c473978e3debbcb20d8a4444f0b4c827 (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
29
30
31
32
/*
 * Copyright (c) 2006-2018, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2021-08-27     Jiao         first version
 */

#include <rtthread.h>
#include "board.h"

int main(void)
{
    FL_GPIO_InitTypeDef GPIO_InitStruct = {0};

    FL_GPIO_SetOutputPin(GPIOD, FL_GPIO_PIN_4);
    GPIO_InitStruct.pin = FL_GPIO_PIN_4;
    GPIO_InitStruct.mode = FL_GPIO_MODE_OUTPUT;
    GPIO_InitStruct.outputType = FL_GPIO_OUTPUT_PUSHPULL;
    GPIO_InitStruct.pull = FL_DISABLE;
    FL_GPIO_Init(GPIOD, &GPIO_InitStruct);
    while (1)
    {
        FL_GPIO_SetOutputPin(GPIOD, FL_GPIO_PIN_4);
        rt_thread_mdelay(500);
        FL_GPIO_ResetOutputPin(GPIOD, FL_GPIO_PIN_4);
        rt_thread_mdelay(500);
    }

}