1*f7c85330SMatthias Ringwald /* 2*f7c85330SMatthias Ringwald * Copyright (C) 2016 BlueKitchen GmbH 3*f7c85330SMatthias Ringwald * 4*f7c85330SMatthias Ringwald * Redistribution and use in source and binary forms, with or without 5*f7c85330SMatthias Ringwald * modification, are permitted provided that the following conditions 6*f7c85330SMatthias Ringwald * are met: 7*f7c85330SMatthias Ringwald * 8*f7c85330SMatthias Ringwald * 1. Redistributions of source code must retain the above copyright 9*f7c85330SMatthias Ringwald * notice, this list of conditions and the following disclaimer. 10*f7c85330SMatthias Ringwald * 2. Redistributions in binary form must reproduce the above copyright 11*f7c85330SMatthias Ringwald * notice, this list of conditions and the following disclaimer in the 12*f7c85330SMatthias Ringwald * documentation and/or other materials provided with the distribution. 13*f7c85330SMatthias Ringwald * 3. Neither the name of the copyright holders nor the names of 14*f7c85330SMatthias Ringwald * contributors may be used to endorse or promote products derived 15*f7c85330SMatthias Ringwald * from this software without specific prior written permission. 16*f7c85330SMatthias Ringwald * 4. Any redistribution, use, or modification is done solely for 17*f7c85330SMatthias Ringwald * personal benefit and not for any commercial purpose or for 18*f7c85330SMatthias Ringwald * monetary gain. 19*f7c85330SMatthias Ringwald * 20*f7c85330SMatthias Ringwald * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 21*f7c85330SMatthias Ringwald * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22*f7c85330SMatthias Ringwald * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23*f7c85330SMatthias Ringwald * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS 24*f7c85330SMatthias Ringwald * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25*f7c85330SMatthias Ringwald * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26*f7c85330SMatthias Ringwald * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27*f7c85330SMatthias Ringwald * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28*f7c85330SMatthias Ringwald * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29*f7c85330SMatthias Ringwald * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 30*f7c85330SMatthias Ringwald * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31*f7c85330SMatthias Ringwald * SUCH DAMAGE. 32*f7c85330SMatthias Ringwald * 33*f7c85330SMatthias Ringwald * Please inquire about commercial licensing options at 34*f7c85330SMatthias Ringwald * [email protected] 35*f7c85330SMatthias Ringwald * 36*f7c85330SMatthias Ringwald */ 37*f7c85330SMatthias Ringwald 38*f7c85330SMatthias Ringwald /* 39*f7c85330SMatthias Ringwald * sco_demo_util.h - send/receive test data via SCO, used by hfp_*_demo and hsp_*_demo 40*f7c85330SMatthias Ringwald */ 41*f7c85330SMatthias Ringwald 42*f7c85330SMatthias Ringwald 43*f7c85330SMatthias Ringwald #ifndef __SCO_DEMO_UTIL_H 44*f7c85330SMatthias Ringwald #define __SCO_DEMO_UTIL_H 45*f7c85330SMatthias Ringwald 46*f7c85330SMatthias Ringwald #include "hci.h" 47*f7c85330SMatthias Ringwald 48*f7c85330SMatthias Ringwald #if defined __cplusplus 49*f7c85330SMatthias Ringwald extern "C" { 50*f7c85330SMatthias Ringwald #endif 51*f7c85330SMatthias Ringwald 52*f7c85330SMatthias Ringwald /** 53*f7c85330SMatthias Ringwald * @brief Init demo SCO data production/consumtion 54*f7c85330SMatthias Ringwald */ 55*f7c85330SMatthias Ringwald void sco_demo_init(void); 56*f7c85330SMatthias Ringwald 57*f7c85330SMatthias Ringwald /** 58*f7c85330SMatthias Ringwald * @brief Send next data on con_handle 59*f7c85330SMatthias Ringwald * @param con_handle 60*f7c85330SMatthias Ringwald */ 61*f7c85330SMatthias Ringwald void sco_demo_send(hci_con_handle_t con_handle); 62*f7c85330SMatthias Ringwald 63*f7c85330SMatthias Ringwald /** 64*f7c85330SMatthias Ringwald * @brief Process received data 65*f7c85330SMatthias Ringwald */ 66*f7c85330SMatthias Ringwald void sco_demo_receive(uint8_t * packet, uint16_t size); 67*f7c85330SMatthias Ringwald 68*f7c85330SMatthias Ringwald #if defined __cplusplus 69*f7c85330SMatthias Ringwald } 70*f7c85330SMatthias Ringwald #endif 71*f7c85330SMatthias Ringwald 72*f7c85330SMatthias Ringwald #endif 73