board.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. * 2013-11-15 bright fix SRAM size for heap management
  14. */
  15. // <<< Use Configuration Wizard in Context Menu >>>
  16. #ifndef __BOARD_H__
  17. #define __BOARD_H__
  18. #include <stm32l0xx.h>
  19. /* board configuration */
  20. // <o> SDCard Driver <1=>SDIO sdcard <0=>SPI MMC card
  21. // <i>Default: 1
  22. #define STM32_USE_SDIO 0
  23. /* whether use board external SRAM memory */
  24. // <e>Use external SRAM memory on the board
  25. // <i>Enable External SRAM memory
  26. #define STM32_EXT_SRAM 0
  27. // <o>Begin Address of External SRAM
  28. // <i>Default: 0x68000000
  29. #define STM32_EXT_SRAM_BEGIN 0x68000000 /* the begining address of external SRAM */
  30. // <o>End Address of External SRAM
  31. // <i>Default: 0x68080000
  32. #define STM32_EXT_SRAM_END 0x68080000 /* the end address of external SRAM */
  33. // </e>
  34. // <o> Internal SRAM memory size[Kbytes] <8-64>
  35. // <i>Default: 64
  36. #define STM32_SRAM_SIZE 20
  37. #define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024)
  38. void rt_hw_board_init(void);
  39. /* SD Card init function */
  40. void rt_hw_msd_init(void);
  41. #define PRINT_RCC_FREQ_INFO
  42. #define UFQFPN32
  43. #ifdef RT_USING_PIN
  44. extern inline void stm32_pin_write_early(rt_base_t pin, rt_base_t value);
  45. extern inline int stm32_pin_read_early(rt_base_t pin);
  46. extern void stm32_pin_mode_early(rt_base_t pin, rt_base_t mode);
  47. #endif /*RT_USING_PIN*/
  48. #define RT_USING_UART1
  49. #define UART1_GPIO_TX 19
  50. #define UART1_GPIO_RX 20
  51. #define UART1_GPIO_AF GPIO_AF4_USART1
  52. #define RT_USING_SPI1
  53. #define SPI1PINNSS 8
  54. #define SPI1PINSCK 11
  55. #define SPI1PINMOSI 12
  56. #define SPI1PINMISO 13
  57. #define RT_USING_SI4438
  58. #define SI4438_SDN 7
  59. #endif