/***************************************************************************//** * \file stdio_user.h * \version 1.20 * * \brief * This file provides configuration macros and function prototypes to retarget * I/O functions of the standard C run-time library. * ******************************************************************************** * \copyright * Copyright 2016-2018, Cypress Semiconductor Corporation. All rights reserved. * You may use this file only in accordance with the license, terms, conditions, * disclaimers, and limitations in the end user license agreement accompanying * the software package with which this file was provided. *******************************************************************************/ #ifndef STDIO_USER_H #define STDIO_USER_H /** * \addtogroup group_retarget_io * \{ * Retarget the I/O functions of the standard C run-time library to the user-defined target. * * Application code frequently uses standard I/O library functions, such as * scanf()/printf() to perform input/output operations. This utility allows you to retarget * standard C run-time library I/O functions to the user-defined target. * *
MISRA Rule | *Rule Class (Required/Advisory) | *Rule Description | *Description of Deviation(s) | *
---|---|---|---|
5.6 | *A | *No identifier in one name space should have the same spelling * as an identifier in another name space, with the exception of * structure member and union member names. | *Violated since the utility redefines the function declared in standard * library. | *
6.3 | *A | *typedefs that indicate size and signedness should be used in * place of the basic numerical type. | *Basic numerical types are used to match the definition of the * function with the prototype defined in the standard library. | *
8.8 | *R | *An external object or function shall be declared in one and only one file. | *The _write is declared in the standard i/o library with * weak attribute and is redefined in the utility. | *
14.2 | *R | *All non-null statements shall either: (a) have at least one * side-effect however executed, or (b) cause control flow to change. |
* The unused function parameters are cast to void. This statement * has no side-effect and is used to suppress a compiler warning. | *
20.9 | *R | *The input/output library |
* stdio.h file is included to connect the standard function * definition with their declaration in the standard library. | *
Version | Changes | Reason for Change |
---|---|---|
1.20 | *Changed include path for cy_scb_uart.h to reflect the PDL source code structure | ** |
1.10 | *Added STDIN support | ** |
1.0 | *Initial version | ** |