esp_local_ctrl_set_handler() function
Register protocomm handler for a custom endpoint This API can be called by the application to register a protocomm handler for an endpoint after the local control service has started.
Arguments
ep_name
Name of the endpoint
handler
Endpoint handler function
Return value
- ESP_OK : Success - ESP_FAIL : Failure
Notes
In case of BLE transport the names and uuids of all custom endpoints must be provided beforehand as a part of the `protocomm_ble_config_t` structure set in `esp_local_ctrl_config_t`, and passed to `esp_local_ctrl_start()`.
esp_local_ctrl_set_handler() calls 3 functions:
![]()
esp_local_ctrl_set_handler()
esp_local_ctrl_set_handler() reads 8 variables:
![]()
esp_local_ctrl_set_handler()