1b570940dSMatthias Ringwald /* 2b570940dSMatthias Ringwald * Copyright (C) 2017 BlueKitchen GmbH 3b570940dSMatthias Ringwald * 4b570940dSMatthias Ringwald * Redistribution and use in source and binary forms, with or without 5b570940dSMatthias Ringwald * modification, are permitted provided that the following conditions 6b570940dSMatthias Ringwald * are met: 7b570940dSMatthias Ringwald * 8b570940dSMatthias Ringwald * 1. Redistributions of source code must retain the above copyright 9b570940dSMatthias Ringwald * notice, this list of conditions and the following disclaimer. 10b570940dSMatthias Ringwald * 2. Redistributions in binary form must reproduce the above copyright 11b570940dSMatthias Ringwald * notice, this list of conditions and the following disclaimer in the 12b570940dSMatthias Ringwald * documentation and/or other materials provided with the distribution. 13b570940dSMatthias Ringwald * 3. Neither the name of the copyright holders nor the names of 14b570940dSMatthias Ringwald * contributors may be used to endorse or promote products derived 15b570940dSMatthias Ringwald * from this software without specific prior written permission. 16b570940dSMatthias Ringwald * 4. Any redistribution, use, or modification is done solely for 17b570940dSMatthias Ringwald * personal benefit and not for any commercial purpose or for 18b570940dSMatthias Ringwald * monetary gain. 19b570940dSMatthias Ringwald * 20b570940dSMatthias Ringwald * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 21b570940dSMatthias Ringwald * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22b570940dSMatthias Ringwald * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23*2fca4dadSMilanka Ringwald * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BLUEKITCHEN 24*2fca4dadSMilanka Ringwald * GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25b570940dSMatthias Ringwald * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26b570940dSMatthias Ringwald * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27b570940dSMatthias Ringwald * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28b570940dSMatthias Ringwald * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29b570940dSMatthias Ringwald * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 30b570940dSMatthias Ringwald * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31b570940dSMatthias Ringwald * SUCH DAMAGE. 32b570940dSMatthias Ringwald * 33b570940dSMatthias Ringwald * Please inquire about commercial licensing options at 34b570940dSMatthias Ringwald * [email protected] 35b570940dSMatthias Ringwald * 36b570940dSMatthias Ringwald */ 37b570940dSMatthias Ringwald 38b570940dSMatthias Ringwald /* 39b570940dSMatthias Ringwald * hal_stdin.h 40b570940dSMatthias Ringwald * 41b570940dSMatthias Ringwald * Support for console input for embedded targets 42b570940dSMatthias Ringwald */ 43b570940dSMatthias Ringwald 4480e33422SMatthias Ringwald #ifndef HAL_STDIN_H 4580e33422SMatthias Ringwald #define HAL_STDIN_H 46b570940dSMatthias Ringwald 47b570940dSMatthias Ringwald #if defined __cplusplus 48b570940dSMatthias Ringwald extern "C" { 49b570940dSMatthias Ringwald #endif 50b570940dSMatthias Ringwald 51b570940dSMatthias Ringwald /** 52b570940dSMatthias Ringwald * @brief setup handler for console input 53b570940dSMatthias Ringwald * @param hander to be called with new input, can be from ISR context 54b570940dSMatthias Ringwald */ 55b570940dSMatthias Ringwald void hal_stdin_setup(void (*handler)(char c)); 56b570940dSMatthias Ringwald 57b570940dSMatthias Ringwald #if defined __cplusplus 58b570940dSMatthias Ringwald } 59b570940dSMatthias Ringwald #endif 6080e33422SMatthias Ringwald #endif // HAL_STDIN_H 61