blob: 16c19b5cf66f0b8672047f71298ad017fffcf997 (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
|
/*
* Copyright (c) 2006-2026, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <rtthread.h>
#include <drv_common.h>
#include <hal_data.h>
#include "board.h"
#ifdef RT_USING_PIN
#include <drv_gpio_w.h>
#endif
#ifdef RT_USING_SERIAL_V2
#include <drv_usart_v2.h>
#endif
extern void rt_hw_systick_init(void);
void rt_hw_board_init(void)
{
rt_hw_systick_init();
#if defined(RT_USING_HEAP)
rt_system_heap_init((void *)HEAP_BEGIN, (void *)HEAP_END);
#endif
#ifdef RT_USING_PIN
rt_hw_pin_init();
#endif
#ifdef RT_USING_SERIAL_V2
rt_hw_usart_init();
#endif
#if defined(RT_USING_CONSOLE)
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
#endif
#ifdef RT_USING_COMPONENTS_INIT
rt_components_board_init();
#endif
}
|