ciu32f003_std.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /************************************************************************************************/
  2. /**
  3. * @file ciu32f003_std.h
  4. * @author MCU Ecosystem Development Team
  5. * @brief CIU32F003 STD库对外一级头文件。
  6. * 用户使用STD库时,可以仅引用该头文件即可。
  7. *
  8. *
  9. **************************************************************************************************
  10. * @attention
  11. * Copyright (c) CEC Huada Electronic Design Co.,Ltd. All rights reserved.
  12. *
  13. **************************************************************************************************
  14. */
  15. /*避免头文件重复引用*/
  16. #ifndef CIU32F003_STD_H
  17. #define CIU32F003_STD_H
  18. /************************************************************************************************/
  19. /**
  20. * @addtogroup CIU32F003_STD_Driver
  21. * @{
  22. */
  23. /**
  24. * @defgroup STD STD
  25. * @brief 支持STD库的计时等功能以及STD库对外的统一头文件
  26. * @{
  27. *
  28. */
  29. /************************************************************************************************/
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33. /*------------------------------------------includes--------------------------------------------*/
  34. #include "ciu32f003_std_config.h"
  35. /*--------------------------------------------define--------------------------------------------*/
  36. /************************************************************************************************/
  37. /**
  38. * @defgroup STD_Constants STD Constants
  39. * @brief STD库基础功能的常量定义以及宏定义
  40. * @{
  41. *
  42. */
  43. /************************************************************************************************/
  44. /* STD库的计时有关配置 */
  45. #define STD_DELAY_US (SystemCoreClock/1000000) /**< STD中用于计时的基础值,与计时周期有关 */
  46. /**
  47. * @}
  48. */
  49. /*-------------------------------------------functions------------------------------------------*/
  50. /************************************************************************************************/
  51. /**
  52. * @defgroup STD_External_Functions STD External Functions
  53. * @brief STD库基础功能对外API
  54. * @{
  55. *
  56. */
  57. /************************************************************************************************/
  58. /* STD库计时有关函数 */
  59. void std_delay_init(void);
  60. void std_delayus(uint32_t count);
  61. void std_delayms(uint32_t count);
  62. void std_delayus_start(uint32_t count);
  63. void std_delayms_start(uint32_t count);
  64. bool std_delay_end(void);
  65. /**
  66. * @}
  67. */
  68. #ifdef __cplusplus
  69. }
  70. #endif
  71. /**
  72. * @}
  73. */
  74. /**
  75. * @}
  76. */
  77. #endif /* CIU32F003_STD_H */