board.h 1009 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. #ifndef __BOARD_H__
  11. #define __BOARD_H__
  12. #include <rtthread.h>
  13. #include "ddl.h"
  14. #include "gpio.h"
  15. #include "drv_gpio.h"
  16. /* board configuration */
  17. #define SRAM_BASE 0x20000000
  18. #define SRAM_SIZE 0x2000
  19. #define SRAM_END (SRAM_BASE + SRAM_SIZE)
  20. /* High speed sram. */
  21. #ifdef __CC_ARM
  22. extern int Image$$RW_IRAM1$$ZI$$Limit;
  23. #define HEAP_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit)
  24. #elif __ICCARM__
  25. #pragma section="CSTACK"
  26. #define HEAP_BEGIN (__segment_end("CSTACK"))
  27. #else
  28. extern int __bss_end;
  29. #define HEAP_BEGIN (&__bss_end)
  30. #endif
  31. #ifdef __ICCARM__
  32. #define HEAP_END SRAM_END
  33. #else
  34. #define HEAP_END SRAM_END
  35. #endif
  36. void rt_hw_board_init(void);
  37. void rt_hw_us_delay(rt_uint32_t us);
  38. #endif
  39. // <<< Use Configuration Wizard in Context Menu >>>