rt-thread-official/bsp/raspberry-pico/applications/main.c

31 lines
537 B
C
Raw Normal View History

/*
* Copyright (c) 2006-2021, RT-Thread Development Team
2021-01-28 19:59:31 +08:00
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-01-28 flybreak first version
2021-01-28 19:59:31 +08:00
*/
#include <rtthread.h>
2021-01-28 22:09:28 +08:00
#include <rtdevice.h>
2021-01-28 19:59:31 +08:00
2021-01-28 22:09:28 +08:00
#define LED_PIN 25
2021-01-28 19:59:31 +08:00
2021-01-28 22:09:28 +08:00
int main(void)
{
2021-01-28 19:59:31 +08:00
rt_kprintf("Hello, RT-Thread!\n");
2021-01-28 22:09:28 +08:00
rt_pin_mode(LED_PIN, PIN_MODE_OUTPUT);
while (1)
{
rt_pin_write(LED_PIN, 1);
2021-01-28 19:59:31 +08:00
rt_thread_mdelay(1000);
2021-01-28 22:09:28 +08:00
rt_pin_write(LED_PIN, 0);
2021-01-28 19:59:31 +08:00
rt_thread_mdelay(1000);
}
}