mcpwm_new_generator() function
Allocate MCPWM generator from given operator
Arguments
oper
MCPWM operator, allocated by `mcpwm_new_operator()`
config
MCPWM generator configuration
ret_gen
Returned MCPWM generator
Return value
- ESP_OK: Create MCPWM generator successfully - ESP_ERR_INVALID_ARG: Create MCPWM generator failed because of invalid argument - ESP_ERR_NO_MEM: Create MCPWM generator failed because out of memory - ESP_ERR_NOT_FOUND: Create MCPWM generator failed because can't find free resource - ESP_FAIL: Create MCPWM generator failed because of other error
Examples
mcpwm_new_generator() is referenced by 5 libraries and example projects: