mcpwm_new_comparator() function
Create MCPWM comparator
Arguments
oper
MCPWM operator, allocated by `mcpwm_new_operator()`, the new comparator will be allocated from this operator
config
MCPWM comparator configuration
ret_cmpr
Returned MCPWM comparator
Return value
- ESP_OK: Create MCPWM comparator successfully - ESP_ERR_INVALID_ARG: Create MCPWM comparator failed because of invalid argument - ESP_ERR_NO_MEM: Create MCPWM comparator failed because out of memory - ESP_ERR_NOT_FOUND: Create MCPWM comparator failed because can't find free resource - ESP_FAIL: Create MCPWM comparator failed because of other error
Examples
mcpwm_new_comparator() is referenced by 5 libraries and example projects: