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
|
2021-02-11 16:18:33 +08:00
|
|
|
* 2021-02-11 supperthomas first version
|
2021-02-06 07:36:26 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <rtthread.h>
|
|
|
|
#include <rtdevice.h>
|
2021-02-11 10:57:00 +08:00
|
|
|
|
2021-02-16 08:53:51 +08:00
|
|
|
#define GPIO_LED_PIN 13
|
|
|
|
|
2021-02-06 07:36:26 +08:00
|
|
|
int main(void)
|
|
|
|
{
|
2021-02-11 10:57:00 +08:00
|
|
|
int count = 1;
|
2021-02-16 08:53:51 +08:00
|
|
|
rt_pin_mode(GPIO_LED_PIN, PIN_MODE_OUTPUT);
|
2021-02-06 07:36:26 +08:00
|
|
|
while (count++)
|
2021-02-11 10:57:00 +08:00
|
|
|
{
|
2021-02-16 08:53:51 +08:00
|
|
|
rt_pin_write(GPIO_LED_PIN, PIN_HIGH);
|
|
|
|
rt_thread_mdelay(500);
|
|
|
|
|
|
|
|
rt_pin_write(GPIO_LED_PIN, PIN_LOW);
|
2021-02-06 07:36:26 +08:00
|
|
|
rt_thread_mdelay(500);
|
|
|
|
}
|
|
|
|
return RT_EOK;
|
2021-02-11 16:18:33 +08:00
|
|
|
}
|