pub unsafe extern "C" fn esp_mesh_set_active_duty_cycle(
    dev_duty: c_int,
    dev_duty_type: c_int
) -> esp_err_t
Expand description

@brief Set the device duty cycle and type - The range of dev_duty values is 1 to 100. The default value is 10. - dev_duty = 100, the PS will be stopped. - dev_duty is better to not less than 5. - dev_duty_type could be MESH_PS_DEVICE_DUTY_REQUEST or MESH_PS_DEVICE_DUTY_DEMAND. - If dev_duty_type is set to MESH_PS_DEVICE_DUTY_REQUEST, the device will use a nwk_duty provided by the network. - If dev_duty_type is set to MESH_PS_DEVICE_DUTY_DEMAND, the device will use the specified dev_duty.

@attention This API can be called at any time after mesh is started.

@param[in] dev_duty device duty cycle @param[in] dev_duty_type device PS duty cycle type, not accept MESH_PS_NETWORK_DUTY_MASTER

@return

  • ESP_OK
  • ESP_FAIL