2022-05-06 09:28:21 +08:00
|
|
|
/*
|
2022-05-31 11:53:56 +08:00
|
|
|
* Copyright (c) 2006-2022, RT-Thread Development Team
|
|
|
|
* Copyright (c) 2022, Xiaohua Semiconductor Co., Ltd.
|
2022-05-06 09:28:21 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2022-04-28 CDT first version
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <rtthread.h>
|
|
|
|
#include <rtdevice.h>
|
|
|
|
#include <board.h>
|
|
|
|
|
|
|
|
|
|
|
|
/* defined the LED_GREEN pin: PC9 */
|
|
|
|
#define LED_GREEN_PIN GET_PIN(C, 9)
|
|
|
|
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
/* set LED_GREEN_PIN pin mode to output */
|
|
|
|
rt_pin_mode(LED_GREEN_PIN, PIN_MODE_OUTPUT);
|
|
|
|
|
|
|
|
while (1)
|
|
|
|
{
|
|
|
|
rt_pin_write(LED_GREEN_PIN, PIN_HIGH);
|
|
|
|
rt_thread_mdelay(500);
|
|
|
|
rt_pin_write(LED_GREEN_PIN, PIN_LOW);
|
|
|
|
rt_thread_mdelay(500);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|