board.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2009-09-22 Bernard add board.h to this bsp
  9. * 2010-02-04 Magicoe add board.h to LPC176x bsp
  10. * 2013-12-18 Bernard porting to LPC4088 bsp
  11. */
  12. #ifndef __BOARD_H__
  13. #define __BOARD_H__
  14. //#include "LPC54xxx.h"
  15. #include "chip.h"
  16. #include <rtthread.h>
  17. /* disable SDRAM in default */
  18. #ifndef LPC_EXT_SDRAM
  19. #define LPC_EXT_SDRAM 0
  20. #endif
  21. // <RDTConfigurator URL="http://www.rt-thread.com/eclipse">
  22. // <integer name="LPC_EXT_SDRAM" description="Begin Address of External SDRAM" default="0xA0000000" />
  23. #define LPC_EXT_SDRAM_BEGIN 0xA0000000
  24. // <integer name="LPC_EXT_SDRAM_END" description="End Address of External SDRAM" default="0xA2000000" />
  25. #define LPC_EXT_SDRAM_END 0xA2000000
  26. // <bool name="RT_USING_UART0" description="Using UART0" default="true" />
  27. #define RT_USING_UART0
  28. // <bool name="RT_USING_UART1" description="Using UART1" default="true" />
  29. //#define RT_USING_UART1
  30. // <bool name="RT_USING_UART2" description="Using UART2" default="true" />
  31. #define RT_USING_UART2
  32. // <string name="RT_CONSOLE_DEVICE_NAME" description="The name of console device" default="" />
  33. #define RT_CONSOLE_DEVICE_NAME "uart0"
  34. // </RDTConfigurator>
  35. #ifdef __CC_ARM
  36. extern int Image$$RW_IRAM1$$ZI$$Limit;
  37. #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
  38. #elif __ICCARM__
  39. #pragma section="HEAP"
  40. #define HEAP_BEGIN (__segment_end("HEAP"))
  41. #else
  42. extern int __bss_end;
  43. #define HEAP_BEGIN ((void *)&__bss_end)
  44. #endif
  45. #define HEAP_END (void*)(0x10000000 + 0x10000)
  46. void rt_hw_board_init(void);
  47. int rt_hw_board_heap_init(void);
  48. #ifdef RT_USING_RTGUI
  49. int rtgui_lcd_init(void);
  50. int touch_calibration_init(void);
  51. #endif
  52. #endif