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
This commit is contained in:
Wu Bo Wen 2020-07-29 17:55:28 +08:00
parent 3e8833cda8
commit 14a6b1db56

View File

@ -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;