board.h 2.0 KB

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