mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-20 21:01:25 +03:00
First Release wifi firmware
This commit is contained in:
49
wifiHD/src/debug.h
Normal file
49
wifiHD/src/debug.h
Normal file
@ -0,0 +1,49 @@
|
||||
//*********************************************/
|
||||
//
|
||||
// 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_) */
|
||||
|
||||
#define WARN(msg, args...) do { \
|
||||
printk("W-[%s] " msg , __func__ , ##args ); \
|
||||
} while (0)
|
||||
|
||||
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
|
Reference in New Issue
Block a user