EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #615 background imageLoading...
Page #615 background image
Chapter 2. API Reference
esp_err_t esp_local_ctrl_add_property(const esp_local_ctrl_prop_t *prop)
Add a new property.
This adds a new property and allocates internal resources for it. The total number of properties that could be
added is limited by configuration option max_properties
Return
ESP_OK : Success
ESP_FAIL : Failure
Parameters
[in] prop: Property description structure
esp_err_t esp_local_ctrl_remove_property(const char *name)
Remove a property.
This finds a property by name, and releases the internal resources which are associated with it.
Return
ESP_OK : Success
ESP_ERR_NOT_FOUND : Failure
Parameters
[in] name: Name of the property to remove
const esp_local_ctrl_prop_t *esp_local_ctrl_get_property(const char *name)
Get property description structure by name.
This API may be used to get a propertys context structure esp_local_ctrl_prop_t when its name
is known
Return
Pointer to property
NULL if not found
Parameters
[in] name: Name of the property to find
esp_err_t esp_local_ctrl_set_handler(const char *ep_name, protocomm_req_handler_t han-
dler, void *user_ctx)
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.
Note 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().
Return
ESP_OK : Success
ESP_FAIL : Failure
Parameters
[in] ep_name: Name of the endpoint
[in] handler: Endpoint handler function
[in] user_ctx: User data
Unions
union esp_local_ctrl_transport_config_t
#include <esp_local_ctrl.h> Transport mode (BLE / HTTPD) configuration.
Public Members
esp_local_ctrl_transport_config_ble_t *ble
This is same as protocomm_ble_config_t. See protocomm_ble.h for available configuration
parameters.
Espressif Systems 604
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Espressif ESP32-S2 and is the answer not in the manual?

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish