Integrating the ublox LISA C200 modem

Fork of SprintUSBModemHTTPClientTest by Donatien Garnier

Committer:
sam_grove
Date:
Thu Sep 26 00:44:20 2013 -0500
Revision:
5:3f93dd1d4cb3
Exported program and replaced contents of the repo with the source
to build and debug using keil mdk. Libs NOT upto date are lwip, lwip-sys
and socket. these have newer versions under mbed_official but were starting
from a know working point

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sam_grove 5:3f93dd1d4cb3 1 /* dbg.h */
sam_grove 5:3f93dd1d4cb3 2 /* Copyright (C) 2012 mbed.org, MIT License
sam_grove 5:3f93dd1d4cb3 3 *
sam_grove 5:3f93dd1d4cb3 4 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
sam_grove 5:3f93dd1d4cb3 5 * and associated documentation files (the "Software"), to deal in the Software without restriction,
sam_grove 5:3f93dd1d4cb3 6 * including without limitation the rights to use, copy, modify, merge, publish, distribute,
sam_grove 5:3f93dd1d4cb3 7 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
sam_grove 5:3f93dd1d4cb3 8 * furnished to do so, subject to the following conditions:
sam_grove 5:3f93dd1d4cb3 9 *
sam_grove 5:3f93dd1d4cb3 10 * The above copyright notice and this permission notice shall be included in all copies or
sam_grove 5:3f93dd1d4cb3 11 * substantial portions of the Software.
sam_grove 5:3f93dd1d4cb3 12 *
sam_grove 5:3f93dd1d4cb3 13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
sam_grove 5:3f93dd1d4cb3 14 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
sam_grove 5:3f93dd1d4cb3 15 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
sam_grove 5:3f93dd1d4cb3 16 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
sam_grove 5:3f93dd1d4cb3 17 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
sam_grove 5:3f93dd1d4cb3 18 */
sam_grove 5:3f93dd1d4cb3 19
sam_grove 5:3f93dd1d4cb3 20 #ifndef DBG_H_
sam_grove 5:3f93dd1d4cb3 21 #define DBG_H_
sam_grove 5:3f93dd1d4cb3 22
sam_grove 5:3f93dd1d4cb3 23 #ifdef __cplusplus
sam_grove 5:3f93dd1d4cb3 24 extern "C" {
sam_grove 5:3f93dd1d4cb3 25 #endif
sam_grove 5:3f93dd1d4cb3 26
sam_grove 5:3f93dd1d4cb3 27
sam_grove 5:3f93dd1d4cb3 28 void debug_init(void);
sam_grove 5:3f93dd1d4cb3 29 void debug(int level, const char* module, int line, const char* fmt, ...);
sam_grove 5:3f93dd1d4cb3 30 void debug_set_newline(const char* newline);
sam_grove 5:3f93dd1d4cb3 31 void debug_set_speed(int speed);
sam_grove 5:3f93dd1d4cb3 32 void debug_error(const char* module, int line, int ret);
sam_grove 5:3f93dd1d4cb3 33 void debug_exact(const char* fmt, ...);
sam_grove 5:3f93dd1d4cb3 34
sam_grove 5:3f93dd1d4cb3 35 #define DBG_INIT() do{ debug_init(); }while(0)
sam_grove 5:3f93dd1d4cb3 36
sam_grove 5:3f93dd1d4cb3 37 #define DBG_SET_NEWLINE( x ) do{ debug_set_newline(x); }while(0)
sam_grove 5:3f93dd1d4cb3 38
sam_grove 5:3f93dd1d4cb3 39 #define DBG_SET_SPEED( x ) do{ debug_set_speed(x); }while(0)
sam_grove 5:3f93dd1d4cb3 40
sam_grove 5:3f93dd1d4cb3 41 #if __DEBUG__ > 0
sam_grove 5:3f93dd1d4cb3 42 #ifndef __MODULE__
sam_grove 5:3f93dd1d4cb3 43 #error "__MODULE__ must be defined"
sam_grove 5:3f93dd1d4cb3 44 #endif
sam_grove 5:3f93dd1d4cb3 45 #endif
sam_grove 5:3f93dd1d4cb3 46
sam_grove 5:3f93dd1d4cb3 47 #if __DEBUG__ >= 1
sam_grove 5:3f93dd1d4cb3 48 #define ERR(...) do{ debug(1, __MODULE__, __LINE__, __VA_ARGS__); }while(0)
sam_grove 5:3f93dd1d4cb3 49 #else
sam_grove 5:3f93dd1d4cb3 50 #define ERR(...) do{ }while(0)
sam_grove 5:3f93dd1d4cb3 51 #endif
sam_grove 5:3f93dd1d4cb3 52
sam_grove 5:3f93dd1d4cb3 53 #if __DEBUG__ >= 2
sam_grove 5:3f93dd1d4cb3 54 #define WARN(...) do{ debug(2, __MODULE__, __LINE__, __VA_ARGS__); }while(0)
sam_grove 5:3f93dd1d4cb3 55 #else
sam_grove 5:3f93dd1d4cb3 56 #define WARN(...) do{ }while(0)
sam_grove 5:3f93dd1d4cb3 57 #endif
sam_grove 5:3f93dd1d4cb3 58
sam_grove 5:3f93dd1d4cb3 59 #if __DEBUG__ >= 3
sam_grove 5:3f93dd1d4cb3 60 #define INFO(...) do{ debug(3, __MODULE__, __LINE__, __VA_ARGS__); }while(0)
sam_grove 5:3f93dd1d4cb3 61 #define CHECK(ret) do{ if(ret){ debug_error(__MODULE__, __LINE__, ret); } }while(0)
sam_grove 5:3f93dd1d4cb3 62 #else
sam_grove 5:3f93dd1d4cb3 63 #define INFO(...) do{ }while(0)
sam_grove 5:3f93dd1d4cb3 64 #define CHECK(ret) do{ }while(0)
sam_grove 5:3f93dd1d4cb3 65 #endif
sam_grove 5:3f93dd1d4cb3 66
sam_grove 5:3f93dd1d4cb3 67 #if __DEBUG__ >= 4
sam_grove 5:3f93dd1d4cb3 68 #define DBG(...) do{ debug(4, __MODULE__, __LINE__, __VA_ARGS__); }while(0)
sam_grove 5:3f93dd1d4cb3 69 #define DBGX(...) do{ debug_exact(__VA_ARGS__); }while(0)
sam_grove 5:3f93dd1d4cb3 70 #else
sam_grove 5:3f93dd1d4cb3 71 #define DBG(...) do{ }while(0)
sam_grove 5:3f93dd1d4cb3 72 #define DBGX(...) do{ }while(0)
sam_grove 5:3f93dd1d4cb3 73 #endif
sam_grove 5:3f93dd1d4cb3 74
sam_grove 5:3f93dd1d4cb3 75 #ifdef __cplusplus
sam_grove 5:3f93dd1d4cb3 76 }
sam_grove 5:3f93dd1d4cb3 77 #endif
sam_grove 5:3f93dd1d4cb3 78
sam_grove 5:3f93dd1d4cb3 79 #endif /* DBG_H_ */