diff options
author | Damien <damien.p.george@gmail.com> | 2013-12-05 20:38:23 +0000 |
---|---|---|
committer | Damien <damien.p.george@gmail.com> | 2013-12-05 20:38:23 +0000 |
commit | 065f8a5e0e513e687511ee9689052e528cbe3100 (patch) | |
tree | 2f13a304a1b58b6ab21fd97285fd30cb8c6997f3 /stm/cc3k/ccdebug.h | |
parent | 8fe8413b5650d46bf9a81d2d26a4e4f9fdddaea8 (diff) | |
download | micropython-065f8a5e0e513e687511ee9689052e528cbe3100.tar.gz micropython-065f8a5e0e513e687511ee9689052e528cbe3100.zip |
stm: initial commit of working CC3000 driver, based on Adafruit.
Diffstat (limited to 'stm/cc3k/ccdebug.h')
-rw-r--r-- | stm/cc3k/ccdebug.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/stm/cc3k/ccdebug.h b/stm/cc3k/ccdebug.h new file mode 100644 index 0000000000..6237e1dbe6 --- /dev/null +++ b/stm/cc3k/ccdebug.h @@ -0,0 +1,56 @@ +/**************************************************************************/ +/*! + @file Adafruit_CC3000.cpp + @author KTOWN (Kevin Townsend for Adafruit Industries) + @license BSD (see license.txt) + + This is a library for the Adafruit CC3000 WiFi breakout board + This library works with the Adafruit CC3000 breakout + ----> https://www.adafruit.com/products/1469 + + Check out the links above for our tutorials and wiring diagrams + These chips use SPI to communicate. + + Adafruit invests time and resources providing this open source code, + please support Adafruit and open-source hardware by purchasing + products from Adafruit! + + @section HISTORY + + v1.0 - Initial release +*/ +/**************************************************************************/ + +//#include <Arduino.h> + +#ifndef _CC3000_DEBUG +#define _CC3000_DEBUG + +#define DEBUG_MODE (0) + +#define PRINT_F(__s) DEBUGPRINT(FLASHIFY(__s)) + +#if (DEBUG_MODE != 0) +#define DEBUGPRINT_F(__s) DEBUGPRINT(FLASHIFY(__s)) +#define DEBUGPRINT_DEC(x) printDec(x) +#define DEBUGPRINT_DEC16(x) printDec16(x) +#define DEBUGPRINT_HEX(x) printHex(x) +#define DEBUGPRINT_HEX16(x) printHex16(x) +#else +#define DEBUGPRINT_F(__s) /* do nothing! */ +#define DEBUGPRINT_DEC(x) +#define DEBUGPRINT_DEC16(x) +#define DEBUGPRINT_HEX(x) +#define DEBUGPRINT_HEX16(x) +#endif + +#if 0 // print debugging info +#define DEBUG_PRINT (1) +#define DEBUG_printf(args...) printf(args) +#else // don't print debugging info +#define DEBUG_printf(args...) (void)0 +#endif + +int printf(const char *fmt, ...); + +#endif |