1*e25b4a2fSMatthias Ringwald /* 2*e25b4a2fSMatthias Ringwald * Copyright (C) 2014 BlueKitchen GmbH 3*e25b4a2fSMatthias Ringwald * 4*e25b4a2fSMatthias Ringwald * Redistribution and use in source and binary forms, with or without 5*e25b4a2fSMatthias Ringwald * modification, are permitted provided that the following conditions 6*e25b4a2fSMatthias Ringwald * are met: 7*e25b4a2fSMatthias Ringwald * 8*e25b4a2fSMatthias Ringwald * 1. Redistributions of source code must retain the above copyright 9*e25b4a2fSMatthias Ringwald * notice, this list of conditions and the following disclaimer. 10*e25b4a2fSMatthias Ringwald * 2. Redistributions in binary form must reproduce the above copyright 11*e25b4a2fSMatthias Ringwald * notice, this list of conditions and the following disclaimer in the 12*e25b4a2fSMatthias Ringwald * documentation and/or other materials provided with the distribution. 13*e25b4a2fSMatthias Ringwald * 3. Neither the name of the copyright holders nor the names of 14*e25b4a2fSMatthias Ringwald * contributors may be used to endorse or promote products derived 15*e25b4a2fSMatthias Ringwald * from this software without specific prior written permission. 16*e25b4a2fSMatthias Ringwald * 4. Any redistribution, use, or modification is done solely for 17*e25b4a2fSMatthias Ringwald * personal benefit and not for any commercial purpose or for 18*e25b4a2fSMatthias Ringwald * monetary gain. 19*e25b4a2fSMatthias Ringwald * 20*e25b4a2fSMatthias Ringwald * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 21*e25b4a2fSMatthias Ringwald * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22*e25b4a2fSMatthias Ringwald * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23*e25b4a2fSMatthias Ringwald * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS 24*e25b4a2fSMatthias Ringwald * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25*e25b4a2fSMatthias Ringwald * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26*e25b4a2fSMatthias Ringwald * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27*e25b4a2fSMatthias Ringwald * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28*e25b4a2fSMatthias Ringwald * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29*e25b4a2fSMatthias Ringwald * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 30*e25b4a2fSMatthias Ringwald * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31*e25b4a2fSMatthias Ringwald * SUCH DAMAGE. 32*e25b4a2fSMatthias Ringwald * 33*e25b4a2fSMatthias Ringwald * Please inquire about commercial licensing options at 34*e25b4a2fSMatthias Ringwald * [email protected] 35*e25b4a2fSMatthias Ringwald * 36*e25b4a2fSMatthias Ringwald */ 37*e25b4a2fSMatthias Ringwald 38*e25b4a2fSMatthias Ringwald /* 39*e25b4a2fSMatthias Ringwald * btstack_run_loop_wiced.h 40*e25b4a2fSMatthias Ringwald * 41*e25b4a2fSMatthias Ringwald * Functions relevant for BTstack WICED port 42*e25b4a2fSMatthias Ringwald */ 43*e25b4a2fSMatthias Ringwald 44*e25b4a2fSMatthias Ringwald #ifndef __btstack_run_loop_WICED_H 45*e25b4a2fSMatthias Ringwald #define __btstack_run_loop_WICED_H 46*e25b4a2fSMatthias Ringwald 47*e25b4a2fSMatthias Ringwald #include "btstack_config.h" 48*e25b4a2fSMatthias Ringwald #include "btstack_run_loop.h" 49*e25b4a2fSMatthias Ringwald #include "wiced.h" 50*e25b4a2fSMatthias Ringwald 51*e25b4a2fSMatthias Ringwald #if defined __cplusplus 52*e25b4a2fSMatthias Ringwald extern "C" { 53*e25b4a2fSMatthias Ringwald #endif 54*e25b4a2fSMatthias Ringwald 55*e25b4a2fSMatthias Ringwald /** 56*e25b4a2fSMatthias Ringwald * @brief Provide btstack_run_loop_posix instance for use with btstack_run_loop_init 57*e25b4a2fSMatthias Ringwald */ 58*e25b4a2fSMatthias Ringwald const btstack_run_loop_t * btstack_run_loop_wiced_get_instance(void); 59*e25b4a2fSMatthias Ringwald 60*e25b4a2fSMatthias Ringwald /* 61*e25b4a2fSMatthias Ringwald * @brief Execute code on BTstack run loop. Can be used to control BTstack from a different thread 62*e25b4a2fSMatthias Ringwald */ 63*e25b4a2fSMatthias Ringwald void btstack_run_loop_wiced_execute_code_on_main_thread(wiced_result_t (*fn)(void *arg), void * arg); 64*e25b4a2fSMatthias Ringwald 65*e25b4a2fSMatthias Ringwald /* API_END */ 66*e25b4a2fSMatthias Ringwald 67*e25b4a2fSMatthias Ringwald #if defined __cplusplus 68*e25b4a2fSMatthias Ringwald } 69*e25b4a2fSMatthias Ringwald #endif 70*e25b4a2fSMatthias Ringwald 71*e25b4a2fSMatthias Ringwald #endif // __btstack_run_loop_WICED_H 72