2021-08-20 16:37:50 +08:00
|
|
|
/*
|
2022-07-26 10:11:12 +08:00
|
|
|
* Copyright (c) 2006-2022, RT-Thread Development Team
|
2021-08-20 16:37:50 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
2022-07-26 10:11:12 +08:00
|
|
|
* Date Author Notes
|
|
|
|
* 2021-08-27 Jiao first version
|
|
|
|
* 2022-07-20 wudiyidashi support gpio
|
2021-08-20 16:37:50 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <rtthread.h>
|
2021-08-27 15:19:21 +08:00
|
|
|
#include "board.h"
|
2021-08-20 16:37:50 +08:00
|
|
|
|
2022-07-26 10:11:12 +08:00
|
|
|
#define LED1 GET_PIN(D, 4)
|
|
|
|
|
2021-08-20 16:37:50 +08:00
|
|
|
int main(void)
|
2022-07-26 10:11:12 +08:00
|
|
|
|
2021-08-20 16:37:50 +08:00
|
|
|
{
|
2022-07-26 10:11:12 +08:00
|
|
|
rt_pin_mode(LED1, PIN_MODE_OUTPUT);
|
|
|
|
rt_pin_write(LED1, PIN_HIGH);
|
2021-08-27 15:19:21 +08:00
|
|
|
|
2021-08-20 16:37:50 +08:00
|
|
|
while (1)
|
|
|
|
{
|
2022-07-26 10:11:12 +08:00
|
|
|
rt_pin_write(LED1, PIN_HIGH);
|
2021-08-20 16:37:50 +08:00
|
|
|
rt_thread_mdelay(500);
|
2022-07-26 10:11:12 +08:00
|
|
|
rt_pin_write(LED1, PIN_LOW);
|
2021-08-20 16:37:50 +08:00
|
|
|
rt_thread_mdelay(500);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|