Syntax
#define PHY_CHECK(a, str, goto_tag, ...) \
do \
{ \
if (!(a)) \
{ \
ESP_LOGE(TAG, "%s(%d): " str, __FUNCTION__, __LINE__, ##__VA_ARGS__); \
goto goto_tag; \
} \
} while (0)
![]()
#define PHY_CHECK(a, str, goto_tag, ...) \![]()
PHY_CHECK(eth, "can't set mediator for enc28j60 to null", err);![]()
PHY_CHECK(false, "unknown duplex", err);![]()
PHY_CHECK(bmcr.power_down == 1, "power down failed", err);![]()
PHY_CHECK(bmcr.power_down == 0, "power up failed", err);![]()
PHY_CHECK(addr, "addr can't be null", err);![]()
PHY_CHECK(config, "can't set phy config to null", err);![]()
PHY_CHECK(enc28j60, "calloc enc28j60 failed", err);