Function esp_idf_hal::sys::mcpwm_new_comparator
source · pub unsafe extern "C" fn mcpwm_new_comparator(
oper: *mut mcpwm_oper_t,
config: *const mcpwm_comparator_config_t,
ret_cmpr: *mut *mut mcpwm_cmpr_t,
) -> i32
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