rt-thread-official/bsp/nrf5x/nrf52840/applications/application.c

32 lines
592 B
C
Raw Normal View History

2020-04-14 22:17:27 +08:00
/*
2021-03-14 15:18:33 +08:00
* Copyright (c) 2006-2021, RT-Thread Development Team
2020-04-14 22:17:27 +08:00
*
2020-07-22 22:47:27 +08:00
* SPDX-License-Identifier: Apache-2.0
2020-04-14 22:17:27 +08:00
*
* Change Logs:
* Date Author Notes
2020-07-22 22:47:27 +08:00
* 2020-04-29 supperthomas first version
2021-06-26 18:47:31 +08:00
* 2021-06-26 supperthomas fix led
2020-07-22 22:47:27 +08:00
*
2020-04-14 22:17:27 +08:00
*/
#include <rtthread.h>
2020-07-22 22:47:27 +08:00
#include <rtdevice.h>
2020-04-14 22:17:27 +08:00
int main(void)
2020-04-14 22:17:27 +08:00
{
2021-03-14 15:18:33 +08:00
int count = 1;
2021-06-26 18:47:31 +08:00
rt_pin_mode(RT_BSP_LED_PIN, PIN_MODE_OUTPUT);
2021-03-14 15:18:33 +08:00
2020-06-20 14:52:37 +08:00
while (count++)
2021-03-14 15:18:33 +08:00
{
2021-06-26 18:47:31 +08:00
rt_pin_write(RT_BSP_LED_PIN, PIN_HIGH);
2020-06-20 14:52:37 +08:00
rt_thread_mdelay(500);
2021-03-14 15:18:33 +08:00
2021-06-26 18:47:31 +08:00
rt_pin_write(RT_BSP_LED_PIN, PIN_LOW);
2021-03-14 15:18:33 +08:00
rt_thread_mdelay(500);
2020-06-20 14:52:37 +08:00
}
return RT_EOK;
2020-04-14 22:17:27 +08:00
}