pwm_config.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright (c) 2006-2023, 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. #define PWM2_CONFIG \
  19. { \
  20. .tim_handle.Instance = TIM2, \
  21. .name = "pwm2", \
  22. .channel = RT_NULL \
  23. }
  24. #endif /* BSP_USING_PWM2 */
  25. #ifdef BSP_USING_PWM3
  26. #define PWM3_CONFIG \
  27. { \
  28. .tim_handle.Instance = TIM3, \
  29. .name = "pwm3", \
  30. .channel = RT_NULL \
  31. }
  32. #endif /* BSP_USING_PWM2 */
  33. #ifdef __cplusplus
  34. }
  35. #endif
  36. #endif /* __PWM_CONFIG_H__ */