pub unsafe extern "C" fn mcpwm_new_comparator(
    oper: mcpwm_oper_handle_t,
    config: *const mcpwm_comparator_config_t,
    ret_cmpr: *mut mcpwm_cmpr_handle_t
) -> esp_err_t
Expand description

@brief Create MCPWM comparator

@param[in] oper MCPWM operator, allocated by mcpwm_new_operator(), the new comparator will be allocated from this operator @param[in] config MCPWM comparator configuration @param[out] ret_cmpr Returned MCPWM comparator @return - 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