Swimate V2 without RTOS code
Dependencies: Adafruit_GFX_128x64 DS3231 PinDetect SDFileSystem USBDevice mbed RealtimeMath MODSERIAL
debug.h
- Committer:
- ellingjp
- Date:
- 2014-05-17
- Revision:
- 7:33a74adff0ff
- Child:
- 9:a711b5b34d73
File content as of revision 7:33a74adff0ff:
#ifndef _DEBUG_H #define _DEBUG_H #include "mbed.h" #include "USBSerial.h" #define DMP_ERROR_RATE 1 #define SD_ERROR_RATE 2 //#define NDEBUG #ifndef NDEBUG /************ On-board LED Access ****************/ extern DigitalOut led; #define DIE(x) while (1) {led = !led; wait(x);} // Halt program and flash led x times /s /************ PC Serial Print Commands ****************/ extern USBSerial pc; #define PC_PRINT(x) pc.printf("%s", x); #define PC_PRINTF(x,y) pc.printf(x, y); #define PC_PRINTLN(x) pc.printf("%s\r\n", x); #define PC_PRINTLNF(x,y) pc.printf(x,y); pc.printf("\r\n"); #define PC_PRINTR(x) pc.printf("%s\r",x); #define PC_PRINTFR(x,y) pc.printf(x,y); pc.printf("\r"); #else #define DIE(x) #define PC_PRINT(x) #define PC_PRINTF(x,y) #define PC_PRINTLN(x) #define PC_PRINTLNF(x,y) #define PC_PRINTR(x) #define PC_PRINTFR(x,y) #endif #endif // _DEBUG_H