1 /* 2 * Copyright (C) 2021, Huada Semiconductor Co., Ltd. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2021-08-19 pjq first version 9 */ 10 11 #ifndef __BOARD_H__ 12 #define __BOARD_H__ 13 14 #include <rtthread.h> 15 #include "ddl.h" 16 #include "gpio.h" 17 #include "drv_gpio.h" 18 19 /* board configuration */ 20 #define SRAM_BASE 0x20000000 21 #define SRAM_SIZE 0x2000 22 #define SRAM_END (SRAM_BASE + SRAM_SIZE) 23 24 /* High speed sram. */ 25 #ifdef __CC_ARM 26 extern int Image$$RW_IRAM1$$ZI$$Limit; 27 #define HEAP_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit) 28 #elif __ICCARM__ 29 #pragma section="CSTACK" 30 #define HEAP_BEGIN (__segment_end("CSTACK")) 31 #else 32 extern int __bss_end; 33 #define HEAP_BEGIN (&__bss_end) 34 #endif 35 36 #ifdef __ICCARM__ 37 #define HEAP_END SRAM_END 38 #else 39 #define HEAP_END SRAM_END 40 #endif 41 42 void rt_hw_board_init(void); 43 void rt_hw_us_delay(rt_uint32_t us); 44 45 #endif 46 47 // <<< Use Configuration Wizard in Context Menu >>> 48