drv_pwm.h 774 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (c) 2006-2022, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2022-03-10 leo first version
  9. */
  10. #ifndef __PWM_CONFIG_H__
  11. #define __PWM_CONFIG_H__
  12. #include <rtthread.h>
  13. #include <board.h>
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #define MAX_PERIOD 65535
  18. #ifdef BSP_USING_PWM0
  19. #ifndef PWM0_CONFIG
  20. #define PWM0_CONFIG \
  21. { \
  22. .name = "pwm0", \
  23. .channel = 0, \
  24. .gpio = 0, \
  25. }
  26. #endif /* PWM0_CONFIG */
  27. #endif /* BSP_USING_PWM0 */
  28. #ifdef __cplusplus
  29. }
  30. #endif
  31. #endif