mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 22:20:37 +00:00
fix compile for embedded
This commit is contained in:
parent
e5780900c0
commit
06afb09fdb
@ -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
|
||||
|
@ -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?
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user