xyControl  0.1
Quadrotor Flight Controller on AVR Basis
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
Files | Macros
Debug Output

Allows debug ouput and assert usage. More...

Files

file  debug.h
 Debug and Assert Header and Implementation.
 

Macros

#define DEBUGOUT(x)   printf("!%s\n", x)
 Debug Output Function. More...
 
#define ASSERTFUNC(x)
 Simple Assert Implementation. More...
 
#define assert(x)   ASSERTFUNC(x)
 Enable assert() More...
 
#define debugPrint(ignore)
 Disable debugPrint() More...
 

Detailed Description

Allows debug ouput and assert usage.

Usage: Before including this file, define DEBUG as the debuglevel, eg:

#define DEBUG 1

for debuglevel 1. Then use debugPrint("Foo") in your code. If you need to calculate stuff for your debug output, enclose it:

#if DEBUG >= 1
debugPrint("Bar");
#endif

Macro Definition Documentation

#define assert (   x)    ASSERTFUNC(x)

Enable assert()

Definition at line 88 of file debug.h.

#define ASSERTFUNC (   x)

Simple Assert Implementation.

Definition at line 67 of file debug.h.

#define DEBUGOUT (   x)    printf("!%s\n", x)

Debug Output Function.

Definition at line 64 of file debug.h.

#define debugPrint (   ignore)

Disable debugPrint()

Examples:
uartFlight.c.

Definition at line 96 of file debug.h.