/** 
 * \file arm_assert.h
 * \brief arm_assert header file
 *
 * File contains \c Assert macro. In debug mode (#ifdef DEBUG) program stopped after false condition
 * and throw breakpoint. In normal mode (#ifndef DEBUG) is called processor reset.
 *
 * \author Juraj Golej
 * \version 1.0
 */


#ifndef ARM_ASSERT_H_
#define ARM_ASSERT_H_

#include "sam.h"

#ifdef DEBUG
#define Assert(condition) if(!(condition)) __asm("BKPT #0");
#else
#define Assert(condition) if(!(condition)) ((void)0);
#endif

#endif /* ARM_ASSERT_H_ */