blob: b2efdf4da0ac20612f1e23b499cd2b6a1e2766b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/*
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-12-14 supperthomas first version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#define LED1_PIN GET_PIN(C, 0)
int main(void)
{
/* set LED2 pin mode to output */
rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT);
#ifdef BSP_USING_USBD
rt_console_set_device("vcom");
#endif
while (1)
{
rt_pin_write(LED1_PIN, PIN_HIGH);
rt_thread_mdelay(2000);
rt_pin_write(LED1_PIN, PIN_LOW);
rt_thread_mdelay(2000);
}
}
|