xyControl
0.1
Quadrotor Flight Controller on AVR Basis
|
Error reporting with human readable strings. More...
Files | |
file | error.h |
Global listing of different error conditions. | |
Macros | |
#define | CHECKERROR(x) if(x!=SUCCESS){return x;} |
Check an Error Code. More... | |
#define | REPORTERROR(x) |
Report an error, if it occured. More... | |
Enumerations | |
enum | Error { SUCCESS = 0, TWI_NO_ANSWER, TWI_WRITE_ERROR, MALLOC_FAIL, ERROR, ARGUMENT_ERROR } |
Error Conditions. More... | |
Functions | |
char * | getErrorString (Error e) |
Returns a human-readable error description. More... | |
Error reporting with human readable strings.
#define CHECKERROR | ( | x | ) | if(x!=SUCCESS){return x;} |
Check an Error Code.
Return it if an error occured.
Definition at line 56 of file error.h.
Referenced by orientationInit(), and orientationTask().
#define REPORTERROR | ( | x | ) |
Report an error, if it occured.
Using printf()
enum Error |
char* getErrorString | ( | Error | e | ) |
Returns a human-readable error description.
Free the string after use!
Definition at line 58 of file error.c.
References errorTable.