mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Update to ESP_ERROR_CHECK
See request from ESP_Angus here: https://esp32.com/viewtopic.php?f=18&t=1179 Merges #339 https://github.com/espressif/esp-idf/pull/339
This commit is contained in:
parent
ec31b39989
commit
e14d65d704
@ -45,7 +45,7 @@ typedef int32_t esp_err_t;
|
|||||||
* and terminate the program in case the code is not ESP_OK.
|
* and terminate the program in case the code is not ESP_OK.
|
||||||
* Prints the failed statement to serial output.
|
* Prints the failed statement to serial output.
|
||||||
*/
|
*/
|
||||||
#define ESP_ERROR_CHECK(x) do { esp_err_t rc = (x); if (rc != ESP_OK) { assert(0 && #x);} } while(0);
|
#define ESP_ERROR_CHECK(x) do { esp_err_t rc = (x); if (rc != ESP_OK) { ESP_LOGE("err", "esp_err_t = %d", rc); assert(0 && #x);} } while(0);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user