summaryrefslogtreecommitdiff
path: root/bsp/thead-smart/drivers/board.c
blob: 5828668a1f9ceb6e8b598f8ae8e163a11c7a4b3d (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
45
46
47
48
/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2020-08-20     zx.chen      add T-HEAD header file csi_core.h
 */

#include <rthw.h>
#include <rtthread.h>

#include "board.h"
#include "csi_core.h"
#include "drv_usart.h"

extern int __bss_end__;
#define SYS_HEAP_BEGIN    (&__bss_end__)

#include "core_rv32.h"


extern usart_handle_t console_handle;
extern void ioreuse_initial(void);
extern int rt_hw_usart_init(void);

/**
 * This function will initial smart-evb board.
 */
void rt_hw_board_init(void)
{
#ifdef RT_USING_COMPONENTS_INIT
    rt_components_board_init();
#endif
    /* initialize hardware usart */
    rt_hw_usart_init();

#if defined(RT_USING_CONSOLE) && defined(RT_USING_DEVICE)
    rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
#endif

#ifdef RT_USING_HEAP
    rt_system_heap_init((void *)SYS_HEAP_BEGIN, (void *)E906FD_IRAM_END);
#endif
}

/*@}*/