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