Syntax
#define MAC_CHECK(a, str, goto_tag, ret_value, ...) \
do \
{ \
if (!(a)) \
{ \
ESP_LOGE(TAG, "%s(%d): " str, __FUNCTION__, __LINE__, ##__VA_ARGS__); \
ret = ret_value; \
goto goto_tag; \
} \
} while (0)
![]()
#define MAC_CHECK(a, str, goto_tag, ret_value, ...) \![]()
MAC_CHECK(enc28j60_config, "can't set enc28j60 specific config to null", err, NULL);![]()
MAC_CHECK(mac_config, "can't set mac config to null", err, NULL);![]()
MAC_CHECK(emac, "calloc emac failed", err, NULL);![]()
MAC_CHECK(emac->spi_lock, "create spi lock failed", err, NULL);![]()
MAC_CHECK(emac->reg_trans_lock, "create register transaction lock failed", err, NULL);![]()
MAC_CHECK(emac->tx_ready_sem, "create pkt transmit ready semaphore failed", err, NULL);![]()
MAC_CHECK(xReturned == pdPASS, "create enc28j60 task failed", err, NULL);