drv_pwm.h 681 B

12345678910111213141516171819202122232425262728293031323334353637
  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. * 2020-06-27 AHTYDHD the first version
  9. */
  10. #ifndef __DRV_PWM_H__
  11. #define __DRV_PWM_H__
  12. #include <stdint.h>
  13. #include<rtdevice.h>
  14. #include<rthw.h>
  15. struct tm4c123_pwm
  16. {
  17. struct tm4c123_pwm_config *config;
  18. struct rt_device_pwm pwm_device;
  19. };
  20. /* tm4c123 config class */
  21. struct tm4c123_pwm_config
  22. {
  23. rt_uint8_t channel;
  24. char *name;
  25. uint32_t counterMode;
  26. uint32_t syncMode;
  27. };
  28. int rt_hw_pwm_init(void);
  29. #endif /*__DRV_PWM_H__*/
  30. /************************** end of file ******************/