add HAVE_WICED

This commit is contained in:
Matthias Ringwald 2015-12-22 21:48:36 +01:00
parent 8736ab0cf2
commit b303a37ec9
2 changed files with 21 additions and 2 deletions

View File

@ -63,6 +63,10 @@ extern run_loop_t run_loop_posix;
extern run_loop_t run_loop_cocoa;
#endif
#ifdef HAVE_WICED
extern run_loop_t run_loop_wiced;
#endif
// assert run loop initialized
static void run_loop_assert(void){
#ifndef EMBEDDED
@ -167,6 +171,12 @@ void run_loop_init(RUN_LOOP_TYPE type){
break;
#endif
default:
#ifdef HAVE_WICED
case RUN_LOOP_WICED:
the_run_loop = &run_loop_wiced;
break;
#endif
#ifndef EMBEDDED
log_error("ERROR: invalid run loop type %u selected!", type);
exit(10);

View File

@ -46,7 +46,7 @@
#include "btstack-config.h"
#include "linked_list.h"
#include "bk_linked_list.h"
#include <stdint.h>
@ -61,7 +61,8 @@ extern "C" {
typedef enum {
RUN_LOOP_POSIX = 1,
RUN_LOOP_COCOA,
RUN_LOOP_EMBEDDED
RUN_LOOP_EMBEDDED,
RUN_LOOP_WICED,
} RUN_LOOP_TYPE;
typedef struct data_source {
@ -152,6 +153,14 @@ void embedded_trigger(void);
*/
void embedded_execute_once(void);
#endif
#ifdef HAVE_WICED
/*
* @brief Execute code on BTsatck run loop. Can be used to control BTstack from a different thread
*/
void wiced_execute_code_on_run_loop(void (*fn)(void *arg), void * arg);
#endif
/* API_END */
#if defined __cplusplus