1de9c9f72SMatthias Ringwald /* 2de9c9f72SMatthias Ringwald * Copyright (C) 2021 BlueKitchen GmbH 3de9c9f72SMatthias Ringwald * 4de9c9f72SMatthias Ringwald * Redistribution and use in source and binary forms, with or without 5de9c9f72SMatthias Ringwald * modification, are permitted provided that the following conditions 6de9c9f72SMatthias Ringwald * are met: 7de9c9f72SMatthias Ringwald * 8de9c9f72SMatthias Ringwald * 1. Redistributions of source code must retain the above copyright 9de9c9f72SMatthias Ringwald * notice, this list of conditions and the following disclaimer. 10de9c9f72SMatthias Ringwald * 2. Redistributions in binary form must reproduce the above copyright 11de9c9f72SMatthias Ringwald * notice, this list of conditions and the following disclaimer in the 12de9c9f72SMatthias Ringwald * documentation and/or other materials provided with the distribution. 13de9c9f72SMatthias Ringwald * 3. Neither the name of the copyright holders nor the names of 14de9c9f72SMatthias Ringwald * contributors may be used to endorse or promote products derived 15de9c9f72SMatthias Ringwald * from this software without specific prior written permission. 16de9c9f72SMatthias Ringwald * 17*2fca4dadSMilanka Ringwald * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 18de9c9f72SMatthias Ringwald * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19de9c9f72SMatthias Ringwald * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 20*2fca4dadSMilanka Ringwald * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BLUEKITCHEN 21*2fca4dadSMilanka Ringwald * GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 22de9c9f72SMatthias Ringwald * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 23de9c9f72SMatthias Ringwald * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 24de9c9f72SMatthias Ringwald * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 25de9c9f72SMatthias Ringwald * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26de9c9f72SMatthias Ringwald * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27de9c9f72SMatthias Ringwald * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28de9c9f72SMatthias Ringwald * SUCH DAMAGE. 29de9c9f72SMatthias Ringwald * 30de9c9f72SMatthias Ringwald */ 31de9c9f72SMatthias Ringwald 32de9c9f72SMatthias Ringwald /* 33de9c9f72SMatthias Ringwald * Implementation of BTstack's stdin functionality 34de9c9f72SMatthias Ringwald * Plus Windows-specific API extension to handle CTRL-C 35de9c9f72SMatthias Ringwald */ 36de9c9f72SMatthias Ringwald 37de9c9f72SMatthias Ringwald #ifndef BTSTACK_STDIN_WINDOWS_H 38de9c9f72SMatthias Ringwald #define BTSTACK_STDIN_WINDOWS_H 39de9c9f72SMatthias Ringwald 40de9c9f72SMatthias Ringwald #if defined __cplusplus 41de9c9f72SMatthias Ringwald extern "C" { 42de9c9f72SMatthias Ringwald #endif 43de9c9f72SMatthias Ringwald 44de9c9f72SMatthias Ringwald /** 45de9c9f72SMatthias Ringwald * Init Window stdin handler 46de9c9f72SMatthias Ringwald */ 47de9c9f72SMatthias Ringwald void btstack_stdin_windows_init(void); 48de9c9f72SMatthias Ringwald 49de9c9f72SMatthias Ringwald /** 50de9c9f72SMatthias Ringwald * Register callback for CTRL-c 51de9c9f72SMatthias Ringwald */ 52de9c9f72SMatthias Ringwald void btstack_stdin_window_register_ctrl_c_callback(void (*callback)(void)); 53de9c9f72SMatthias Ringwald 54de9c9f72SMatthias Ringwald #if defined __cplusplus 55de9c9f72SMatthias Ringwald } 56de9c9f72SMatthias Ringwald #endif 57de9c9f72SMatthias Ringwald #endif // BTSTACK_TLV_POSIX_H 58