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
mcpwm_new_comparator() calls 9 functions:
![]()
mcpwm_new_comparator()
mcpwm_new_comparator() reads 18 variables and writes 2 variables:
![]()
mcpwm_new_comparator()