4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-25 16:37:06 +08:00

19 lines
286 B
C
Raw Normal View History

2023-08-23 09:11:03 +08:00
#include "rtthread.h"
#include "rtdevice.h"
#define LED_PIN 0
int main(void)
{
rt_pin_mode(LED_PIN, PIN_MODE_OUTPUT);
rt_uint8_t out = 0;
while(1)
{
rt_thread_mdelay(500);
rt_pin_write(LED_PIN, out);
out = (out + 1) % 2;
}
return 0;
}