Revision 1461
updated all the library code to have sensible _init behavior.
Almost all of the library components have a global variable which gets set after init and the functions inside will fail with an error code if init has not been called. Also, the init functions themselves check this variable and will bail out without doing any damage if that init has already been called
dragonfly_lib.h | ||
---|---|---|
41 | 41 |
* @{ |
42 | 42 |
**/ |
43 | 43 |
|
44 |
//return value definitions |
|
45 |
#define ERROR_INIT_FAILED 1 |
|
46 |
#define ERROR_INIT_ALREADY_INITD 2 |
|
47 |
|
|
48 |
#define ERROR_LIBRARY_NOT_INITD 3 |
|
49 |
|
|
44 | 50 |
// Configuration definitions |
45 | 51 |
/** @brief Initialize analog **/ |
46 | 52 |
#define ANALOG 0x01 |
Also available in: Unified diff