Is it possible to define custom esp_err_t types in addition to the existing esp errors?
I can see the definition of the esp error codes in some header files. It defines an error base + the unique error number as hex.
For instance in esp_ota_ops.h:
Code: Select all
#define ESP_ERR_OTA_BASE 0x1500 /*!< Base error code for ota_ops api */
#define ESP_ERR_OTA_PARTITION_CONFLICT (ESP_ERR_OTA_BASE + 0x01) /*!< Error if request was to write or erase the current running partition */
If adding custom esp_err_t types is not possible what is the best practice to return ESP error codes and my own defined error codes from my functions?
Thanks