drv_clk.h 645 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. * 2021-08-20 breo.com first version
  9. */
  10. #ifndef __DRV_CLK_H__
  11. #define __DRV_CLK_H__
  12. #include <stdint.h>
  13. #include <rtthread.h>
  14. #include <rthw.h>
  15. #ifdef RT_USING_DEVICE
  16. #include <rtdevice.h>
  17. #endif
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. void DumpClock(const char *msg);
  22. void SetSysClockToHSI(void);
  23. void SetSysClockToHSE(void);
  24. enum
  25. {
  26. SYSCLK_PLLSRC_HSI,
  27. SYSCLK_PLLSRC_HSE,
  28. };
  29. void SetSysClockToPLL(uint32_t freq, uint8_t src);
  30. #ifdef __cplusplus
  31. }
  32. #endif
  33. #endif