1*4de4bebcSJens Wiklander /* 2*4de4bebcSJens Wiklander * Copyright (c) 2014, STMicroelectronics International N.V. 3*4de4bebcSJens Wiklander * All rights reserved. 4*4de4bebcSJens Wiklander * 5*4de4bebcSJens Wiklander * Redistribution and use in source and binary forms, with or without 6*4de4bebcSJens Wiklander * modification, are permitted provided that the following conditions are met: 7*4de4bebcSJens Wiklander * 8*4de4bebcSJens Wiklander * 1. Redistributions of source code must retain the above copyright notice, 9*4de4bebcSJens Wiklander * this list of conditions and the following disclaimer. 10*4de4bebcSJens Wiklander * 11*4de4bebcSJens Wiklander * 2. Redistributions in binary form must reproduce the above copyright notice, 12*4de4bebcSJens Wiklander * this list of conditions and the following disclaimer in the documentation 13*4de4bebcSJens Wiklander * and/or other materials provided with the distribution. 14*4de4bebcSJens Wiklander * 15*4de4bebcSJens Wiklander * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16*4de4bebcSJens Wiklander * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17*4de4bebcSJens Wiklander * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18*4de4bebcSJens Wiklander * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 19*4de4bebcSJens Wiklander * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20*4de4bebcSJens Wiklander * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21*4de4bebcSJens Wiklander * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22*4de4bebcSJens Wiklander * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23*4de4bebcSJens Wiklander * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24*4de4bebcSJens Wiklander * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25*4de4bebcSJens Wiklander * POSSIBILITY OF SUCH DAMAGE. 26*4de4bebcSJens Wiklander */ 27*4de4bebcSJens Wiklander #ifndef TRACE_LEVELS_H 28*4de4bebcSJens Wiklander #define TRACE_LEVELS_H 29*4de4bebcSJens Wiklander 30*4de4bebcSJens Wiklander /* 31*4de4bebcSJens Wiklander * Trace levels. 32*4de4bebcSJens Wiklander * 33*4de4bebcSJens Wiklander * ALWAYS is used when you always want a print to be seen, but it is not always 34*4de4bebcSJens Wiklander * an error. 35*4de4bebcSJens Wiklander * 36*4de4bebcSJens Wiklander * ERROR is used when some kind of error has happened, this is most likely the 37*4de4bebcSJens Wiklander * print you will use most of the time when you report some kind of error. 38*4de4bebcSJens Wiklander * 39*4de4bebcSJens Wiklander * INFO is used when you want to print some 'normal' text to the user. 40*4de4bebcSJens Wiklander * This is the default level. 41*4de4bebcSJens Wiklander * 42*4de4bebcSJens Wiklander * DEBUG is used to print extra information to enter deeply in the module. 43*4de4bebcSJens Wiklander * 44*4de4bebcSJens Wiklander * FLOW is used to print the execution flox, typically the in/out of functions. 45*4de4bebcSJens Wiklander * 46*4de4bebcSJens Wiklander */ 47*4de4bebcSJens Wiklander 48*4de4bebcSJens Wiklander #define TRACE_MIN 1 49*4de4bebcSJens Wiklander #define TRACE_ERROR TRACE_MIN 50*4de4bebcSJens Wiklander #define TRACE_INFO 2 51*4de4bebcSJens Wiklander #define TRACE_DEBUG 3 52*4de4bebcSJens Wiklander #define TRACE_FLOW 4 53*4de4bebcSJens Wiklander #define TRACE_MAX TRACE_FLOW 54*4de4bebcSJens Wiklander 55*4de4bebcSJens Wiklander /* Trace level of the casual printf */ 56*4de4bebcSJens Wiklander #define TRACE_PRINTF_LEVEL TRACE_ERROR 57*4de4bebcSJens Wiklander 58*4de4bebcSJens Wiklander #endif /*TRACE_LEVELS_H*/ 59