HW_TIMER_ATY.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /**
  2. * @file HW_TIMER_ATY.h
  3. *
  4. * @param Project DEVICE_GENERAL_ATY_LIB
  5. *
  6. * @author ATY
  7. *
  8. * @copyright
  9. * - Copyright 2017 - 2023 MZ-ATY
  10. * - This code follows:
  11. * - MZ-ATY Various Contents Joint Statement -
  12. * <a href="https://mengze.top/MZ-ATY_VCJS">
  13. * https://mengze.top/MZ-ATY_VCJS</a>
  14. * - CC 4.0 BY-NC-SA -
  15. * <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">
  16. * https://creativecommons.org/licenses/by-nc-sa/4.0/</a>
  17. * - Your use will be deemed to have accepted the terms of this statement.
  18. *
  19. * @brief Familiar functions of I2C with IO simulation for all embedded device
  20. *
  21. * @version
  22. * - 1_01_220608 > ATY
  23. * -# Preliminary version, first Release
  24. ********************************************************************************
  25. */
  26. #ifndef __HW_TIMER_ATY_H
  27. #define __HW_TIMER_ATY_H
  28. #include "INCLUDE_ATY.h"
  29. /******************************* For user *************************************/
  30. #ifdef __STC51_ATY
  31. void TimerLoopInit(void);
  32. #endif /* __STC51_ATY */
  33. /******************************************************************************/
  34. void Delay1Us(void);
  35. void DelayUs(uint32_t us);
  36. void DelayMs(uint32_t ms);
  37. void DelaySec(uint32_t sec);
  38. typedef struct _timeBaseCounter_ATY
  39. {
  40. uint32_t msN;
  41. uint32_t ms10;
  42. uint32_t ms100;
  43. uint32_t s1;
  44. uint32_t s2;
  45. uint32_t s10;
  46. uint8_t ms1_f;
  47. uint8_t ms10_f;
  48. uint8_t ms100_f;
  49. uint8_t s1_f;
  50. uint8_t s2_f;
  51. uint8_t s10_f;
  52. } timeBaseCounter;
  53. extern struct _timeBaseCounter_ATY timeCounterUnit_ATY;
  54. void UserTimerLoop_Cycle1ms(void);
  55. void UserTimerLoopProcess(void);
  56. void TimerLoopProcess_User(void);
  57. #endif /* __HW_TIMER_ATY_H */
  58. /******************************** End Of File *********************************/