A library to operate the ESP8266

Dependents:   ESP8266_MDM_LIB

Committer:
epgmdm
Date:
Tue May 23 10:26:19 2017 +0000
Revision:
0:011fdf85bfc8
A working version

Who changed what in which revision?

UserRevisionLine numberNew contents of line
epgmdm 0:011fdf85bfc8 1 /**
epgmdm 0:011fdf85bfc8 2 *@section DESCRIPTION
epgmdm 0:011fdf85bfc8 3 * mbed SolarNanogrid Library - definitions for messages
epgmdm 0:011fdf85bfc8 4 *@section LICENSE
epgmdm 0:011fdf85bfc8 5 * Copyright (c) 2016, Malcolm McCulloch
epgmdm 0:011fdf85bfc8 6 *
epgmdm 0:011fdf85bfc8 7 * Permission is hereby granted, free of charge, to any person obtaining a copy
epgmdm 0:011fdf85bfc8 8 * of this software and associated documentation files (the "Software"), to deal
epgmdm 0:011fdf85bfc8 9 * in the Software without restriction, including without limitation the rights
epgmdm 0:011fdf85bfc8 10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
epgmdm 0:011fdf85bfc8 11 * copies of the Software, and to permit persons to whom the Software is
epgmdm 0:011fdf85bfc8 12 * furnished to do so, subject to the following conditions:
epgmdm 0:011fdf85bfc8 13 *
epgmdm 0:011fdf85bfc8 14 * The above copyright notice and this permission notice shall be included in
epgmdm 0:011fdf85bfc8 15 * all copies or substantial portions of the Software.
epgmdm 0:011fdf85bfc8 16 *
epgmdm 0:011fdf85bfc8 17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
epgmdm 0:011fdf85bfc8 18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
epgmdm 0:011fdf85bfc8 19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
epgmdm 0:011fdf85bfc8 20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
epgmdm 0:011fdf85bfc8 21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
epgmdm 0:011fdf85bfc8 22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
epgmdm 0:011fdf85bfc8 23 * THE SOFTWARE.
epgmdm 0:011fdf85bfc8 24 * @file "defs.h"
epgmdm 0:011fdf85bfc8 25 */
epgmdm 0:011fdf85bfc8 26
epgmdm 0:011fdf85bfc8 27 //
epgmdm 0:011fdf85bfc8 28 // Defines which messages to print
epgmdm 0:011fdf85bfc8 29 //
epgmdm 0:011fdf85bfc8 30 #define DEBUG
epgmdm 0:011fdf85bfc8 31 #define INFOMESSAGES
epgmdm 0:011fdf85bfc8 32 #define WARNMESSAGES
epgmdm 0:011fdf85bfc8 33 #define ERRMESSAGES
epgmdm 0:011fdf85bfc8 34
epgmdm 0:011fdf85bfc8 35 #ifdef DEBUG
epgmdm 0:011fdf85bfc8 36 #define DBG(x, ...) printf("["FUNCNAME" : DBG] "x" <line %d>\r\n", ##__VA_ARGS__,__LINE__);
epgmdm 0:011fdf85bfc8 37 #else
epgmdm 0:011fdf85bfc8 38 #define DBG(x, ...)
epgmdm 0:011fdf85bfc8 39 #endif
epgmdm 0:011fdf85bfc8 40
epgmdm 0:011fdf85bfc8 41 #ifdef ERRMESSAGES
epgmdm 0:011fdf85bfc8 42 #define ERR(x, ...) printf("["FUNCNAME" : ERR] "x"\r\n", ##__VA_ARGS__);
epgmdm 0:011fdf85bfc8 43 #else
epgmdm 0:011fdf85bfc8 44 #define ERR(x, ...)
epgmdm 0:011fdf85bfc8 45 #endif
epgmdm 0:011fdf85bfc8 46
epgmdm 0:011fdf85bfc8 47 #ifdef WARNMESSAGES
epgmdm 0:011fdf85bfc8 48 #define WARN(x, ...) printf("["FUNCNAME" : WARN] "x"\r\n", ##__VA_ARGS__);
epgmdm 0:011fdf85bfc8 49 #else
epgmdm 0:011fdf85bfc8 50 #define WARN(x, ...)
epgmdm 0:011fdf85bfc8 51 #endif
epgmdm 0:011fdf85bfc8 52
epgmdm 0:011fdf85bfc8 53 #ifdef INFOMESSAGES
epgmdm 0:011fdf85bfc8 54 #define INFO(x, ...) printf("["FUNCNAME" : INFO] "x"\r\n", ##__VA_ARGS__);
epgmdm 0:011fdf85bfc8 55 #else
epgmdm 0:011fdf85bfc8 56 #define INFO(x, ...)
epgmdm 0:011fdf85bfc8 57 #endif