X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/39ac72f2d12a9c62b2e876de4eee6c34a864ff74..1c74fd78bdd2362a1b6fd18a5a5d5bbbebc1d777:/LUFA/Common/Common.h diff --git a/LUFA/Common/Common.h b/LUFA/Common/Common.h index f2e5e313d..8e7f2398a 100644 --- a/LUFA/Common/Common.h +++ b/LUFA/Common/Common.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2010. + Copyright (C) Dean Camera, 2011. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -96,21 +96,25 @@ /** Macro for testing condition "x" and breaking via JTAG_DEBUG_BREAK() if the condition is false. * + * \param[in] Condition Condition that will be evaluated, + * * \ingroup Group_Debugging */ - #define JTAG_DEBUG_ASSERT(x) MACROS{ if (!(x)) { JTAG_DEBUG_BREAK(); } }MACROE + #define JTAG_DEBUG_ASSERT(Condition) MACROS{ if (!(Condition)) { JTAG_DEBUG_BREAK(); } }MACROE /** Macro for testing condition "x" and writing debug data to the stdout stream if false. The stdout stream * must be pre-initialized before this macro is run and linked to an output device, such as the AVR's USART * peripheral. * - * The output takes the form "{FILENAME}: Function {FUNCTION NAME}, Line {LINE NUMBER}: Assertion {x} failed." + * The output takes the form "{FILENAME}: Function {FUNCTION NAME}, Line {LINE NUMBER}: Assertion {Condition} failed." + * + * \param[in] Condition Condition that will be evaluated, * * \ingroup Group_Debugging */ - #define STDOUT_ASSERT(x) MACROS{ if (!(x)) { printf_P(PSTR("%s: Function \"%s\", Line %d: " \ - "Assertion \"%s\" failed.\r\n"), \ - __FILE__, __func__, __LINE__, #x); } }MACROE + #define STDOUT_ASSERT(Condition) MACROS{ if (!(x)) { printf_P(PSTR("%s: Function \"%s\", Line %d: " \ + "Assertion \"%s\" failed.\r\n"), \ + __FILE__, __func__, __LINE__, #Condition); } }MACROE /** Forces GCC to use pointer indirection (via the AVR's pointer register pairs) when accessing the given * struct pointer. In some cases GCC will emit non-optimal assembly code when accessing a structure through