2021-08-23 10:13:53 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2021-08-23 AisinoChip the first version
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <rthw.h>
|
|
|
|
#include <rtthread.h>
|
|
|
|
#include "board.h"
|
2021-09-09 18:38:43 +08:00
|
|
|
#include <drivers/pin.h>
|
2021-08-23 10:13:53 +08:00
|
|
|
|
2021-09-09 18:38:43 +08:00
|
|
|
#define LED_PIN_NUM 1 /* PA1 */
|
2021-08-23 10:13:53 +08:00
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
2021-09-09 18:38:43 +08:00
|
|
|
rt_pin_mode(LED_PIN_NUM, PIN_MODE_OUTPUT);
|
|
|
|
|
2021-08-23 10:13:53 +08:00
|
|
|
while(1)
|
|
|
|
{
|
2021-09-09 18:38:43 +08:00
|
|
|
rt_pin_write(LED_PIN_NUM, PIN_LOW);
|
2021-08-23 10:13:53 +08:00
|
|
|
rt_thread_delay(RT_TICK_PER_SECOND/2);
|
2021-09-09 18:38:43 +08:00
|
|
|
rt_pin_write(LED_PIN_NUM, PIN_HIGH);
|
2021-08-23 10:13:53 +08:00
|
|
|
rt_thread_delay(RT_TICK_PER_SECOND/2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|