Skip to content

Commit 14a6b1d

Browse files
author
Wu Bo Wen
committed
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 espressif/esp-idf#4446 closes espressif/esp-idf#2943
1 parent 3e8833c commit 14a6b1d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

components/soc/include/hal/mcpwm_types.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ typedef enum {
8181
* @brief MCPWM select capture starts from which edge
8282
*/
8383
typedef enum {
84-
MCPWM_NEG_EDGE = BIT(0), /*!<Capture the negative edge*/
85-
MCPWM_POS_EDGE = BIT(1), /*!<Capture the positive edge*/
84+
MCPWM_NEG_EDGE = BIT(0), /*!<Capture the negative edge*/
85+
MCPWM_POS_EDGE = BIT(1), /*!<Capture the positive edge*/
86+
MCPWM_BOTH_EDGE = BIT(1)|BIT(0), /*!<Capture both edges*/
8687
} mcpwm_capture_on_edge_t;

0 commit comments

Comments
 (0)