esp_common: add generic check macros

Add four check maros:
* ESP_RETURN_ON_ERROR()
* ESP_GOTO_ON_ERROR()
* ESP_RETURN_ON_FALSE()
* ESP_GOTO_ON_FALSE()

Also add a `xx_ISR` version for each of them, which can be used in ISR.
This commit is contained in:
Shu Chen
2021-03-03 17:18:11 +08:00
parent ffa93ed9ec
commit 6792024add
6 changed files with 345 additions and 14 deletions

View File

@@ -289,6 +289,8 @@ INPUT = \
$(IDF_PATH)/components/esp_ringbuf/include/freertos/ringbuf.h \
### Helper functions for error codes
$(IDF_PATH)/components/esp_common/include/esp_err.h \
### Check macros
$(IDF_PATH)/components/esp_common/include/esp_check.h \
### System APIs
$(IDF_PATH)/components/esp_system/include/esp_system.h \
### Modbus controller component header file