Starting and Stopping the C SDK

Start the C SDK before performing operations.

Initializing the C SDK prompts it to start its internal threads and register required resources. This call can be made from any thread, but it must be made before any other SDK functionality is used.

Example:

int rc;
EspError * error = esp_error_create();
rc = esp_sdk_start(error);
if (rc) {
}

Once the application using C SDK is ready to exit or its functionality is no longer needed, stop the C SDK. This stops its internal threads and releases any held resources.

Example:

rc = esp_sdk_stop(error);
if (rc) {
}

Multiple SDK start calls may be made. The C SDK requires corresponding number of stop calls to properly shutdown.