rt-thread/bsp/raspberry-pi/raspi4-32/applications/main.c

32 lines
620 B
C
Raw Normal View History

2020-05-25 17:30:05 +08:00
/*
* Copyright (c) 2006-2020, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-04-16 bigmagic first version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
2020-10-27 13:18:24 +08:00
#define ACTLED (42)
2020-05-25 17:30:05 +08:00
int main(int argc, char** argv)
{
rt_kprintf("Hi, this is RT-Thread!!\n");
2020-10-27 13:18:24 +08:00
rt_pin_mode(ACTLED, PIN_MODE_OUTPUT);
while(1)
{
rt_pin_write(ACTLED, PIN_HIGH);
rt_thread_mdelay(1000);
rt_pin_write(ACTLED, PIN_LOW);
rt_thread_mdelay(1000);
}
return RT_EOK;
2020-05-25 17:30:05 +08:00
}