board.h 1.8 KB

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