WIZlib Library API  ver 1.0
WIZlib Library API User Menual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
common.h File Reference

Library Common Header File. More...

#include "wizconfig.h"
#include "host/STM32F10x/WIZ_W5200/w5200_evb.h"
#include "host/STM32F10x/WIZ_W7200/w7200_evb.h"
#include "host/STM32F10x/WIZ_W5500/w5500_evb.h"
#include "stm32f10x.h"
#include "host/wizspi.h"
#include "device/w5200/w5200.h"
#include "device/w5500/w5500.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "common/util.h"
#include "device/socket.h"
#include "device/sockutil.h"
#include "host/wizplatform.h"
#include "protocol/DHCP/dhcp.h"
Include dependency graph for common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ERR(fmt)
 Print Error Log without parameter (+CRLF). More...
 
#define ERRA(fmt,...)
 Print Error Log with parameter (+CRLF). More...
 
#define ERRF(fmt)
 Print Error Log without parameter (No CRLF). More...
 
#define ERRFA(fmt,...)
 Print Error Log with parameter (No CRLF). More...
 
#define LOG(fmt)
 Print Error Log without parameter (+CRLF). More...
 
#define LOGA(fmt,...)
 Print Error Log with parameter (+CRLF). More...
 
#define LOGF(fmt)
 Print Error Log without parameter (No CRLF). More...
 
#define LOGFA(fmt,...)
 Print Error Log with parameter (No CRLF). More...
 
#define DBG(fmt)
 Print Error Log without parameter (+CRLF). More...
 
#define DBGA(fmt,...)
 Print Error Log with parameter (+CRLF). More...
 
#define DBGF(fmt)
 Print Error Log without parameter (No CRLF). More...
 
#define DBGFA(fmt,...)
 Print Error Log with parameter (No CRLF). More...
 
#define DBGCRTC(cond_v, fmt)
 Assert Function, Print Error Log without parameter and Stop for debug. More...
 
#define DBGCRTCA(cond_v, fmt,...)
 Assert Function, Print Error Log with parameter and Stop for debug. More...
 
#define NL1   printf("\r\n")
 Print only one CR+LF. More...
 
#define NL2   printf("\r\n\r\n")
 Print only two CR+LF. More...
 
#define NL3   printf("\r\n\r\n\r\n")
 Print only three CR+LF. More...
 

Detailed Description

Library Common Header File.

This header file influence on all library area directly.

Version
1.0
Date
2013/02/22
Revision
2013/02/22 - 1.0 Release
Author
Mike Jeong

Copyright (C) 2013 WIZnet. All rights reserved.

Definition in file common.h.

Macro Definition Documentation

#define DBG (   fmt)

Print Error Log without parameter (+CRLF).

  • Add "\r\n" automatically at last.
  • Print Function name, Line number as well.
  • If PRINT_TIME_LOG is defined, it print also Systick value.

Ex) DBG("Debug Log");

#define DBGA (   fmt,
  ... 
)

Print Error Log with parameter (+CRLF).

  • Add "\r\n" automatically at last.
  • Print Function name, Line number as well.
  • If PRINT_TIME_LOG is defined, it print also Systick value.

Ex) DBGA("Debug Log - Return Value (%d)", ret);

#define DBGCRTC (   cond_v,
  fmt 
)

Assert Function, Print Error Log without parameter and Stop for debug.

  • This was made only for test and debug.
  • This work only on WIZ_LOG_LEVEL 3, if under 3, just be ignored.
  • If this is called, the program will stop at that point.
  • Print same as ERR macro
  • If PRINT_TIME_LOG is defined, it print also Systick value.

Ex) DBGCRTC("Assert");

#define DBGCRTCA (   cond_v,
  fmt,
  ... 
)

Assert Function, Print Error Log with parameter and Stop for debug.

  • This was made only for test and debug.
  • This work only on WIZ_LOG_LEVEL 3, if under 3, just be ignored.
  • If this is called, the program will stop at that point.
  • Print same as ERRA macro
  • If PRINT_TIME_LOG is defined, it print also Systick value.

Ex) DBGCRTCA("Assert - variable A(%d)", ret);

#define DBGF (   fmt)

Print Error Log without parameter (No CRLF).

  • Does not add "\r\n" automatically at last.
  • Print Function name, Line number as well.
  • If PRINT_TIME_LOG is defined, it print also Systick value.

Ex) DBGF("Debug Log");

#define DBGFA (   fmt,
  ... 
)

Print Error Log with parameter (No CRLF).

  • Does not add "\r\n" automatically at last.
  • Print Function name, Line number as well.
  • If PRINT_TIME_LOG is defined, it print also Systick value.

Ex) DBGFA("Debug Log - Return Value (%d)", ret);

#define ERR (   fmt)
Value:
do { printf("### ERROR ### [%5d.%03d] %s(%d): "fmt"\r\n", \
wizpf_get_systick()/1000, wizpf_get_systick()%1000, __FUNCTION__, __LINE__); } while(0)

Print Error Log without parameter (+CRLF).

  • Add "\r\n" automatically at last.
  • Print Function name, Line number as well.
  • If PRINT_TIME_LOG is defined, it print also Systick value.

Ex) ERR("Critical Error Occurred"); // CR+LF Auto Include

#define ERRA (   fmt,
  ... 
)
Value:
do { printf("### ERROR ### [%5d.%03d] %s(%d): "fmt"\r\n", \
wizpf_get_systick()/1000, wizpf_get_systick()%1000, __FUNCTION__, __LINE__, __VA_ARGS__); } while(0)

Print Error Log with parameter (+CRLF).

  • Add "\r\n" automatically at last.
  • Print Function name, Line number as well.
  • If PRINT_TIME_LOG is defined, it print also Systick value.

Ex) ERRA("Critical Error Occurred - Return Value (%d)", ret); // CR+LF Auto Include

#define ERRF (   fmt)
Value:
do { printf("### ERROR ### [%5d.%03d] %s(%d): "fmt, \
wizpf_get_systick()/1000, wizpf_get_systick()%1000, __FUNCTION__, __LINE__); } while(0)

Print Error Log without parameter (No CRLF).

  • Does not add "\r\n" automatically at last.
  • Print Function name, Line number as well.
  • If PRINT_TIME_LOG is defined, it print also Systick value.

Ex) ERRF("Critical Error Occurred"); // No CR+LF

#define ERRFA (   fmt,
  ... 
)
Value:
do { printf("### ERROR ### [%5d.%03d] %s(%d): "fmt, \
wizpf_get_systick()/1000, wizpf_get_systick()%1000, __FUNCTION__, __LINE__, __VA_ARGS__); } while(0)

Print Error Log with parameter (No CRLF).

  • Does not add "\r\n" automatically at last.
  • Print Function name, Line number as well.
  • If PRINT_TIME_LOG is defined, it print also Systick value.

Ex) ERRFA("Critical Error Occurred - Return Value (%d)", ret); // No CR+LF

#define LOG (   fmt)
Value:
do { printf("[%5d.%03d] "fmt"\r\n", \
wizpf_get_systick()/1000, wizpf_get_systick()%1000); } while(0)

Print Error Log without parameter (+CRLF).

  • Add "\r\n" automatically at last.
  • If PRINT_TIME_LOG is defined, it print also Systick value.

Ex) LOG("Normal Log");

#define LOGA (   fmt,
  ... 
)
Value:
do { printf("[%5d.%03d] "fmt"\r\n", \
wizpf_get_systick()/1000, wizpf_get_systick()%1000, __VA_ARGS__); } while(0)

Print Error Log with parameter (+CRLF).

  • Add "\r\n" automatically at last.
  • If PRINT_TIME_LOG is defined, it print also Systick value.

Ex) LOGA("Normal Log - Return Value (%d)", ret);

#define LOGF (   fmt)
Value:
do { printf("[%5d.%03d] "fmt, \
wizpf_get_systick()/1000, wizpf_get_systick()%1000); } while(0)

Print Error Log without parameter (No CRLF).

  • Does not add "\r\n" automatically at last.
  • If PRINT_TIME_LOG is defined, it print also Systick value.

Ex) LOGF("Normal Log");

#define LOGFA (   fmt,
  ... 
)
Value:
do { printf("[%5d.%03d] "fmt, \
wizpf_get_systick()/1000, wizpf_get_systick()%1000, __VA_ARGS__); } while(0)

Print Error Log with parameter (No CRLF).

  • Does not add "\r\n" automatically at last.
  • If PRINT_TIME_LOG is defined, it print also Systick value.

Ex) LOGFA("Normal Log - Return Value (%d)", ret);

#define NL1   printf("\r\n")

Print only one CR+LF.

Ex) NL1;

#define NL2   printf("\r\n\r\n")

Print only two CR+LF.

Ex) NL2;

#define NL3   printf("\r\n\r\n\r\n")

Print only three CR+LF.

Ex) NL3;