rt-thread/bsp/maxim/MAX32660_EVSYS/applications/application.c

32 lines
575 B
C
Raw Normal View History

2021-02-06 07:36:26 +08:00
/*
* Copyright (c) 2006-2020, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-04-29 supperthomas first version
*
*/
#include <rtthread.h>
#include <rtdevice.h>
2021-02-11 04:45:50 +08:00
#include "gpio.h"
2021-02-06 07:36:26 +08:00
2021-02-11 10:57:00 +08:00
const gpio_cfg_t led_pin[] =
{
2021-02-11 04:45:50 +08:00
{PORT_0, PIN_13, GPIO_FUNC_OUT, GPIO_PAD_NONE},
};
2021-02-11 10:57:00 +08:00
2021-02-06 07:36:26 +08:00
int main(void)
{
2021-02-11 10:57:00 +08:00
int count = 1;
2021-02-11 04:45:50 +08:00
GPIO_Config(&led_pin[0]);
GPIO_OutSet(&led_pin[0]);
2021-02-06 07:36:26 +08:00
while (count++)
2021-02-11 10:57:00 +08:00
{
2021-02-06 07:36:26 +08:00
rt_thread_mdelay(500);
2021-02-11 04:45:50 +08:00
GPIO_OutToggle(&led_pin[0]);
2021-02-06 07:36:26 +08:00
}
return RT_EOK;
2021-02-11 10:57:00 +08:00
}