Function esp_idf_sys::mcpwm_new_generator

source ·
pub unsafe extern "C" fn mcpwm_new_generator(
    oper: mcpwm_oper_handle_t,
    config: *const mcpwm_generator_config_t,
    ret_gen: *mut mcpwm_gen_handle_t,
) -> esp_err_t
Expand description

@brief Allocate MCPWM generator from given operator

@param[in] oper MCPWM operator, allocated by mcpwm_new_operator() @param[in] config MCPWM generator configuration @param[out] ret_gen Returned MCPWM generator @return - 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