From 2332f2e3279447a3e9d1c209ebeba440e4ee1457 Mon Sep 17 00:00:00 2001 From: jgromes Date: Mon, 13 Jan 2020 16:36:21 +0100 Subject: [PATCH] Added assert macro --- src/TypeDef.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/TypeDef.h b/src/TypeDef.h index 6236b2be..a77bf6fe 100644 --- a/src/TypeDef.h +++ b/src/TypeDef.h @@ -81,6 +81,11 @@ #define NC (-1) #endif +/*! + \brief A simple assert macro, will return on error. +*/ +#define RADIOLIB_ASSERT(STATEVAR) { if(STATEVAR != ERR_NONE) { return(STATEVAR); } } + /*! \defgroup shield_config Shield Configuration