mcpwm_new_capture_channel() function
Create MCPWM capture channel
Arguments
cap_timer
MCPWM capture timer, allocated by `mcpwm_new_capture_timer()`, will be connected to the new capture channel
config
MCPWM capture channel configuration
ret_cap_channel
Returned MCPWM capture channel
Return value
- ESP_OK: Create MCPWM capture channel successfully - ESP_ERR_INVALID_ARG: Create MCPWM capture channel failed because of invalid argument - ESP_ERR_NO_MEM: Create MCPWM capture channel failed because out of memory - ESP_ERR_NOT_FOUND: Create MCPWM capture channel failed because can't find free resource - ESP_FAIL: Create MCPWM capture channel failed because of other error
Notes
The created capture channel won't be enabled until calling `mcpwm_capture_channel_enable`
Examples
mcpwm_new_capture_channel() is referenced by 2 libraries and example projects: