board.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * File : board.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006, RT-Thread Develop 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. */
  14. // <<< Use Configuration Wizard in Context Menu >>>
  15. #ifndef __BOARD_H__
  16. #define __BOARD_H__
  17. /* board configuration */
  18. // <o> SDCard Driver <1=>SDIO sdcard <0=>SPI MMC card
  19. // <i>Default: 1
  20. #define STM32_USE_SDIO 1
  21. /* whether use board external SRAM memory */
  22. // <e>Use external SRAM memory on the board
  23. // <i>Enable External SRAM memory
  24. #define STM32_EXT_SRAM 1
  25. // <o>Begin Address of External SRAM
  26. // <i>Default: 0x68000000
  27. #define STM32_EXT_SRAM_BEGIN 0x68000000 /* the begining address of external SRAM */
  28. // <o>End Address of External SRAM
  29. // <i>Default: 0x68080000
  30. #define STM32_EXT_SRAM_END 0x68080000 /* the end address of external SRAM */
  31. // </e>
  32. // <o> Internal SRAM memory size[Kbytes] <8-64>
  33. // <i>Default: 64
  34. #define STM32_SRAM_SIZE 64
  35. #define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024)
  36. // <o> Console on USART: <0=> no console <1=>USART 1 <2=>USART 2 <3=> USART 3
  37. // <i>Default: 1
  38. #define STM32_CONSOLE_USART 1
  39. // <o> LCD Module Version
  40. // <1=>Version 1:fmt0371
  41. // <2=>Version 2:ili9320/9325
  42. // <i>Default: 1
  43. #define LCD_VERSION 1
  44. /*
  45. * IMPORTANT NOTICE:
  46. * CODEC_MASTER_MODE = 1 with CODEC_USE_SPI3 = 0 is unusable due to a hardware bug of STM32's SPI2.
  47. */
  48. // <o> CODEC Mode
  49. // <0=>I2S Slave
  50. // <1=>I2S Master
  51. #define CODEC_MASTER_MODE 0
  52. // <o> CODEC SPI Port
  53. // <0=>SPI2
  54. // <1=>SPI3
  55. #define CODEC_USE_SPI3 0
  56. void rt_hw_board_led_on(int n);
  57. void rt_hw_board_led_off(int n);
  58. void rt_hw_board_init(void);
  59. void rt_hw_usart_init(void);
  60. void rt_hw_sdcard_init(void);
  61. #endif
  62. // <<< Use Configuration Wizard in Context Menu >>>