4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-16 05:19:23 +08:00

32 lines
621 B
C

/*
* Copyright (c) 2006-2018, Synwit Technology Co.,Ltd.
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2018-12-10 Zohar_Lee first version
*/
#include <rtthread.h>
#include <rtdevice.h>
/* defined the LED pin: PA12 */
#define LED_PIN 100
int main(void)
{
int count = 1;
/* set LED4 pin mode to output */
rt_pin_mode(LED_PIN, PIN_MODE_OUTPUT);
while (count++)
{
rt_pin_write(LED_PIN, PIN_HIGH);
rt_thread_mdelay(500);
rt_pin_write(LED_PIN, PIN_LOW);
rt_thread_mdelay(500);
}
return RT_EOK;
}