board.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. * 2017-10-20 ZYH emmm...setup for HAL Libraries
  14. */
  15. // <<< Use Configuration Wizard in Context Menu >>>
  16. #ifndef __BOARD_H__
  17. #define __BOARD_H__
  18. #include "stm32f1xx_hal.h"
  19. #ifdef RT_USING_SERIAL
  20. #include "usart.h"
  21. #endif
  22. #ifdef RT_USING_PIN
  23. #include "gpio.h"
  24. #endif
  25. #ifdef RT_USING_SPI
  26. #include "stm32_spi.h"
  27. #endif
  28. /* board configuration */
  29. /* whether use board external SRAM memory */
  30. // <e>Use external SRAM memory on the board
  31. // <i>Enable External SRAM memory
  32. #define STM32_EXT_SRAM 0
  33. // <o>Begin Address of External SRAM
  34. // <i>Default: 0x68000000
  35. #define STM32_EXT_SRAM_BEGIN 0x68000000 /* the begining address of external SRAM */
  36. // <o>End Address of External SRAM
  37. // <i>Default: 0x68080000
  38. #define STM32_EXT_SRAM_END 0x68080000 /* the end address of external SRAM */
  39. // </e>
  40. // <o> Internal SRAM memory size[Kbytes] <8-64>
  41. // <i>Default: 64
  42. #define STM32_SRAM_SIZE 20
  43. #define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024)
  44. // <<< Use Configuration Wizard in Context Menu >>>
  45. void rt_hw_board_init(void);
  46. #endif /* __BOARD_H__ */