1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-10 04:54:21 +01:00
Arduino/wifiHD/src/debug.h

54 lines
1.0 KiB
C
Raw Normal View History

2011-12-30 16:59:50 +01:00
//*********************************************/
//
// File: debug.h
//
// Author: Domenico La Fauci
//
//********************************************/
#ifndef Debug_H
#define Debug_H
#include <stdio.h>
#include <string.h>
#define INFO_0 1
#define INFO_1 2
#define INFO_2 4
#define INFO_3 8
#define INFO_4 16
#define INFO_5 32
#define INFO_D (1<<0xD) // Debug
#define INFO_E (1<<0xE) // Error
#define INFO_F (1<<0xF) // Warning
#ifdef _APP_DEBUG_
#define INFO(msg, args...) do { \
printk("I-[%s] " msg , __func__ , ##args ); \
} while (0)
#else /* !defined(_DEBUG_) */
#define INFO(msg, args...) do {} while (0)
#endif /* !defined(_DEBUG_) */
2012-01-30 00:07:39 +01:00
#if 1
2011-12-30 16:59:50 +01:00
#define WARN(msg, args...) do { \
printk("W-[%s] " msg , __func__ , ##args ); \
} while (0)
2012-01-30 00:07:39 +01:00
#else
#define WARN(msg, args...) do { } while (0)
#endif
2011-12-30 16:59:50 +01:00
extern void dump(char* _buf, uint16_t _count);
#ifdef _APP_DEBUG_
#define DUMP(BUF, COUNT) do { \
printk("[%s]\n", __func__); \
dump((char*)BUF, COUNT); \
} while (0)
#else
#define DUMP(BUF, COUNT) do {} while (0)
#endif
#endif