board.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2018-11-5 SummerGift change to new framework
  9. */
  10. #ifndef __BOARD_H__
  11. #define __BOARD_H__
  12. #include <rtthread.h>
  13. #include <stm32l4xx.h>
  14. #include "drv_common.h"
  15. #include "drv_gpio.h"
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. #define STM32_FLASH_START_ADRESS ((uint32_t)0x08000000)
  20. #define STM32_FLASH_SIZE (1024 * 1024)
  21. #define STM32_FLASH_END_ADDRESS ((uint32_t)(STM32_FLASH_START_ADRESS + STM32_FLASH_SIZE))
  22. #define STM32_SRAM1_SIZE (96)
  23. #define STM32_SRAM1_START (0x20000000)
  24. #define STM32_SRAM1_END (STM32_SRAM1_START + STM32_SRAM1_SIZE * 1024)
  25. #define HEAP_BEGIN STM32_SRAM1_START
  26. #define HEAP_END STM32_SRAM1_END
  27. void SystemClock_Config(void);
  28. #ifdef RT_USING_PM
  29. void SystemClock_MSI_ON(void);
  30. void SystemClock_MSI_OFF(void);
  31. void SystemClock_80M(void);
  32. void SystemClock_24M(void);
  33. void SystemClock_2M(void);
  34. void SystemClock_ReConfig(uint8_t mode);
  35. #endif
  36. #ifdef __cplusplus
  37. }
  38. #endif
  39. #endif