system_py32f0xx.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /**
  2. ******************************************************************************
  3. * @file system_py32f0xx.h
  4. * @brief CMSIS Cortex-M0+ Device Peripheral Access Layer Header File for
  5. * PY32F0xx Device Series
  6. * @version v1.0.0
  7. *
  8. ******************************************************************************
  9. * @attention
  10. *
  11. * <h2><center>&copy; Copyright (c) 2023 Puya Semiconductor Co.
  12. * All rights reserved.</center></h2>
  13. *
  14. * This software component is licensed by Puya under BSD 3-Clause license,
  15. * the "License"; You may not use this file except in compliance with the
  16. * License. You may obtain a copy of the License at:
  17. * opensource.org/licenses/BSD-3-Clause
  18. *
  19. ******************************************************************************
  20. * @attention
  21. *
  22. * <h2><center>&copy; Copyright (c) 2016 STMicroelectronics.
  23. * All rights reserved.</center></h2>
  24. *
  25. * This software component is licensed by ST under BSD 3-Clause license,
  26. * the "License"; You may not use this file except in compliance with the
  27. * License. You may obtain a copy of the License at:
  28. * opensource.org/licenses/BSD-3-Clause
  29. *
  30. ******************************************************************************
  31. */
  32. /* This file refers the CMSIS standard, some adjustments are made according to Puya chips */
  33. #ifndef SYSTEM_PY32F0XX_H
  34. #define SYSTEM_PY32F0XX_H
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38. /* Includes ------------------------------------------------------------------*/
  39. #include <stdint.h>
  40. /* Exported variables --------------------------------------------------------*/
  41. extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
  42. /* Exported constants --------------------------------------------------------*/
  43. extern const uint32_t AHBPrescTable[16]; /*!< AHB prescalers table values */
  44. extern const uint32_t APBPrescTable[8]; /*!< APB prescalers table values */
  45. extern const uint32_t HSIFreqTable[8]; /*!< HSI frequency table values */
  46. /**
  47. * Initialize the system
  48. * @param none
  49. * @return none
  50. * @brief Setup the microcontroller system.
  51. * Initialize the System and update the SystemCoreClock variable.
  52. */
  53. extern void SystemInit(void);
  54. /**
  55. * Update SystemCoreClock variable
  56. * @param none
  57. * @return none
  58. * @brief Updates the SystemCoreClock with current core Clock
  59. * retrieved from cpu registers.
  60. */
  61. extern void SystemCoreClockUpdate(void);
  62. #ifdef __cplusplus
  63. }
  64. #endif
  65. #endif /* SYSTEM_PY32F0XX_H */