mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
mcpwm: fix wrong capture edge
This commit is contained in:
parent
10f16c5d72
commit
87b051c87a
@ -684,9 +684,9 @@ static inline mcpwm_capture_on_edge_t mcpwm_ll_get_captured_edge(mcpwm_dev_t *mc
|
||||
if (cap_sig == 0) {
|
||||
edge = mcpwm->cap_status.cap0_edge;
|
||||
} else if (cap_sig == 1) {
|
||||
edge = mcpwm->cap_status.cap0_edge;
|
||||
edge = mcpwm->cap_status.cap1_edge;
|
||||
} else { //2
|
||||
edge = mcpwm->cap_status.cap0_edge;
|
||||
edge = mcpwm->cap_status.cap2_edge;
|
||||
}
|
||||
return (edge? MCPWM_NEG_EDGE: MCPWM_POS_EDGE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user