pwm_config.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. * 2018-01-05 zylx first version
  9. * 2019-01-08 SummerGift clean up the code
  10. */
  11. #ifndef __PWM_CONFIG_H__
  12. #define __PWM_CONFIG_H__
  13. #include <rtthread.h>
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #ifdef BSP_USING_PWM2
  18. #ifndef PWM2_CONFIG
  19. #define PWM2_CONFIG \
  20. { \
  21. .tim_handle.Instance = TIM2, \
  22. .name = "pwm2", \
  23. .channel = 0 \
  24. }
  25. #endif /* PWM2_CONFIG */
  26. #endif /* BSP_USING_PWM2 */
  27. #ifdef BSP_USING_PWM3
  28. #ifndef PWM3_CONFIG
  29. #define PWM3_CONFIG \
  30. { \
  31. .tim_handle.Instance = TIM3, \
  32. .name = "pwm3", \
  33. .channel = 0 \
  34. }
  35. #endif /* PWM2_CONFIG */
  36. #endif /* BSP_USING_PWM2 */
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. #endif /* __PWM_CONFIG_H__ */