1 /*
2  * Copyright (c) 2006-2023, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2023-03-26     luobeihai      first version
9  */
10 
11 #include <rtthread.h>
12 #include <rtdevice.h>
13 #include <board.h>
14 
15 /* defined the LED1 pin: PD13 */
16 #define LED1_PIN    GET_PIN(D, 13)
17 
main(void)18 int main(void)
19 {
20     uint32_t sysclock = 0;
21     /* set LED1 pin mode to output */
22     rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT);
23     /* Print system clock */
24     sysclock = RCM_ReadSYSCLKFreq();
25     rt_kprintf("System Clock: %d\n", sysclock);
26 
27     while (1)
28     {
29         rt_pin_write(LED1_PIN, PIN_HIGH);
30         rt_thread_mdelay(500);
31         rt_pin_write(LED1_PIN, PIN_LOW);
32         rt_thread_mdelay(500);
33     }
34 }
35