fix compile for embedded

This commit is contained in:
matthias.ringwald 2011-08-05 14:58:02 +00:00
parent e5780900c0
commit 06afb09fdb
2 changed files with 11 additions and 4 deletions

View File

@ -40,19 +40,19 @@
#include <stdio.h>
#ifdef ENABLE_LOG_DEBUG
#define log_debug(format, ...) printf(format, ## __VA_ARGS__)
#define log_debug(format, ...) printf(format"\r", ## __VA_ARGS__)
#else
#define log_debug(...)
#endif
#ifdef ENABLE_LOG_INFO
#define log_info(format, ...) printf(format, ## __VA_ARGS__)
#define log_info(format, ...) printf(format"\r", ## __VA_ARGS__)
#else
#define log_info(...)
#endif
#ifdef ENABLE_LOG_ERROR
#define log_error(format, ...) printf(format, ## __VA_ARGS__)
#define log_error(format, ...) printf(format"\r", ## __VA_ARGS__)
#else
#define log_error(...)
#endif

View File

@ -37,6 +37,13 @@
* individually. Calling ds->isReady() before calling ds->process() doesn't
* make sense, so we just poll each data source round robin.
*
* To support an idle state, where an MCU could go to sleep, the process function
* has to return if it has to called again as soon as possible
*
* After calling process() on every data source and evaluating the pending timers,
* the idle hook gets called if no data source did indicate that it needs to be
* called right away.
*
*/
@ -136,7 +143,7 @@ void embedded_execute() {
ts->process(ts);
}
#endif
// race condition.. poll data source, IRQ occurs -> data source gets ready -> IDLE hook makes MCU sleep?
}
}