Просмотр исходного кода

driver/mcpwm: add an option to capture on both edges.

However, The functionality of capturing on both edges is alternatively done with passing in the two flags ORed together: MCPWM_NEG_EDGE|MCPWM_POS_EDGE

closes https://github.com/espressif/esp-idf/issues/4446
closes https://github.com/espressif/esp-idf/issues/2943
Wu Bo Wen 5 лет назад
Родитель
Сommit
14a6b1db56
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      components/soc/include/hal/mcpwm_types.h

+ 3 - 2
components/soc/include/hal/mcpwm_types.h

@@ -81,6 +81,7 @@ typedef enum {
  * @brief MCPWM select capture starts from which edge
  */
 typedef enum {
-    MCPWM_NEG_EDGE = BIT(0),  /*!<Capture the negative edge*/
-    MCPWM_POS_EDGE = BIT(1),  /*!<Capture the positive edge*/
+    MCPWM_NEG_EDGE = BIT(0),          /*!<Capture the negative edge*/
+    MCPWM_POS_EDGE = BIT(1),          /*!<Capture the positive edge*/
+    MCPWM_BOTH_EDGE = BIT(1)|BIT(0),  /*!<Capture both edges*/
 } mcpwm_capture_on_edge_t;