Function esp_idf_svc::hal::sys::wifi_prov_mgr_endpoint_register
source ยท pub unsafe extern "C" fn wifi_prov_mgr_endpoint_register(
ep_name: *const i8,
handler: Option<unsafe extern "C" fn(_: u32, _: *const u8, _: isize, _: *mut *mut u8, _: *mut isize, _: *mut c_void) -> i32>,
user_ctx: *mut c_void,
) -> i32
Expand description
@brief Register a handler for the previously created endpoint
This API can be called by the application to register a protocomm handler to any endpoint that was created using wifi_prov_mgr_endpoint_create().
@note This API can only be called AFTER provisioning has started
@note Additional endpoints can be used for configuring client provided parameters other than Wi-Fi credentials, that are necessary for the main application and hence must be set prior to starting the application
@note After session establishment, the additional endpoints must be targeted first by the client side application before sending Wi-Fi configuration, because once Wi-Fi configuration finishes the provisioning service is stopped and hence all endpoints are unregistered
@param[in] ep_name Name of the endpoint @param[in] handler Endpoint handler function @param[in] user_ctx User data
@return
- ESP_OK : Success
- ESP_FAIL : Failure