A Port of TI's Webserver for the CC3000
Embed:
(wiki syntax)
Show/hide line numbers
HttpDebug.cpp
00001 /***************************************************************************** 00002 * 00003 * HttpDebug.c 00004 * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ 00005 * 00006 * Redistribution and use in source and binary forms, with or without 00007 * modification, are permitted provided that the following conditions 00008 * are met: 00009 * 00010 * Redistributions of source code must retain the above copyright 00011 * notice, this list of conditions and the following disclaimer. 00012 * 00013 * Redistributions in binary form must reproduce the above copyright 00014 * notice, this list of conditions and the following disclaimer in the 00015 * documentation and/or other materials provided with the 00016 * distribution. 00017 * 00018 * Neither the name of Texas Instruments Incorporated nor the names of 00019 * its contributors may be used to endorse or promote products derived 00020 * from this software without specific prior written permission. 00021 * 00022 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00023 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00024 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00025 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 00026 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00027 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00028 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00029 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00030 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00031 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00032 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 * 00034 *****************************************************************************/ 00035 #include "HttpDebug.h" 00036 00037 00038 #ifdef HTTP_CORE_ENABLE_DEBUG 00039 #include "mbed.h" 00040 #ifdef WIN32 00041 00042 #include <stdio.h> 00043 #include <stdarg.h> 00044 00045 void HttpDebug(const char* pFormat, ...) 00046 { 00047 char buffer[2048]; 00048 va_list argptr; 00049 va_start(argptr, pFormat); 00050 00051 vsprintf_s(buffer, sizeof(buffer), pFormat, argptr); 00052 00053 va_end(argptr); 00054 00055 HttpDebugStr(buffer); 00056 } 00057 00058 void HttpDebugStr(const char* pString) 00059 { 00060 printf("%s\n", pString); 00061 } 00062 00063 void HttpAssert(int condition) 00064 { 00065 if (condition) 00066 return; 00067 00068 printf("ASSERTION!\n"); 00069 while (1) 00070 { 00071 } 00072 } 00073 00074 #endif 00075 #else 00076 void HttpDebug(const char* pFormat, ...) 00077 { 00078 00079 } 00080 void HttpDebugStr(const char* pString) 00081 { 00082 00083 } 00084 void HttpAssert(int condition) 00085 { 00086 00087 } 00088 #endif 00089
Generated on Wed Jul 13 2022 13:30:51 by
1.7.2