4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-16 07:39:21 +08:00

32 lines
621 B
C
Raw Normal View History

2018-12-24 17:17:27 +08:00
/*
* 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
2018-12-24 17:17:27 +08:00
int main(void)
{
int count = 1;
/* set LED4 pin mode to output */
rt_pin_mode(LED_PIN, PIN_MODE_OUTPUT);
while (count++)
2018-12-24 17:17:27 +08:00
{
rt_pin_write(LED_PIN, PIN_HIGH);
rt_thread_mdelay(500);
rt_pin_write(LED_PIN, PIN_LOW);
rt_thread_mdelay(500);
2018-12-24 17:17:27 +08:00
}
return RT_EOK;
2018-12-24 17:17:27 +08:00
}