Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patterns #10

Open
Mischback opened this issue May 6, 2022 · 1 comment
Open

Patterns #10

Mischback opened this issue May 6, 2022 · 1 comment
Labels
area/repository Affects the repository (e.g. structure)

Comments

@Mischback
Copy link
Owner

This issue is meant to collect some common patterns for the project.

@Mischback Mischback added the area/repository Affects the repository (e.g. structure) label May 6, 2022
@Mischback Mischback pinned this issue May 6, 2022
@Mischback
Copy link
Owner Author

Mischback commented May 6, 2022

Error Handling of ESP-IDF functions

esp_err_t esp_ret;
esp_ret = [call esp_idf_function];  // call of ESP function
if (esp_ret != ESP_OK) {
    ESP_LOGE(TAG, "Could not [perform whatever should be done]"!);
    ESP_LOGD(
        TAG, 
        "'[esp_idf_function()]' returned %s [%d]", 
        esp_err_to_name(esp_ret),
        esp_ret);
    return esp_ret;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/repository Affects the repository (e.g. structure)
Projects
None yet
Development

No branches or pull requests

1 participant