HW_PWM_ATY.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /**
  2. * @file HW_PWM_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 definition of PWM for users
  20. *
  21. * @version
  22. * - 1_01_220602 > ATY
  23. * -# Preliminary version, first Release
  24. * - Undone
  25. ********************************************************************************
  26. */
  27. #ifndef __HW_PWM_ATY_H
  28. #define __HW_PWM_ATY_H
  29. #include "INCLUDE_ATY.h"
  30. /******************************* For user *************************************/
  31. // #define __DEBUG_HW_PWM_ATY
  32. /******************************************************************************/
  33. #if defined(__STC51_ATY)
  34. #elif defined(__STM32_HAL_ATY)
  35. #elif defined(__ESP8266_RTOS_ATY)
  36. #endif /* PLATFORM */
  37. void PWM_Start(uint32_t periodS, float dutyS, uint8_t channelS);
  38. void PWM_Stop(uint8_t level, uint8_t channelS);
  39. void PwmFreqSet(uint32_t periodS, uint8_t channelS);
  40. #if defined(__STC8G_ATY)
  41. void PWM_StartPulse(uint32_t periodS, uint8_t channelS);
  42. #endif
  43. #ifdef __DEBUG_HW_PWM_ATY
  44. void PWM_Test(uint8_t testType);
  45. #endif /* __DEBUG_HW_PWM_ATY */
  46. #endif /* __HW_PWM_ATY_H */
  47. /******************************** End Of File *********************************/