1 /*
2  * Copyright (c) 2006-2022, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2021-03-17     supperthomas first version
9  */
10 
11 #include <rtthread.h>
12 #include <board.h>
13 
14 /* defined the LED0 pin: PI8 */
15 #define LED0_PIN    GET_PIN(I, 8)
16 
17 #ifdef RT_USING_WIFI
18     extern void wlan_autoconnect_init(void);
19 #endif
20 
main(void)21 int main(void)
22 {
23     /* set LED0 pin mode to output */
24     rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
25     #ifdef RT_USING_WIFI
26     /* init Wi-Fi auto connect feature */
27     wlan_autoconnect_init();
28     /* enable auto reconnect on WLAN device */
29     rt_wlan_config_autoreconnect(RT_TRUE);
30     #endif
31 
32     while (1)
33     {
34         rt_pin_write(LED0_PIN, PIN_HIGH);
35         rt_thread_mdelay(500);
36         rt_pin_write(LED0_PIN, PIN_LOW);
37         rt_thread_mdelay(500);
38     }
39 }
40 
41 #include "stm32h7xx.h"
vtor_config(void)42 static int vtor_config(void)
43 {
44     /* Vector Table Relocation in Internal QSPI_FLASH */
45     SCB->VTOR = QSPI_BASE;
46     return 0;
47 }
48 INIT_BOARD_EXPORT(vtor_config);
49