Wifly Driver  V1.0
Macros | Functions
Log.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define STRACE   "TRC->"
 
#define SINFO   "INF->"
 
#define SERROR   "ERR->"
 
#define SCRLF   "\r\n"
 
#define LV_TRACE   3
 
#define LV_INFO   2
 
#define LV_ERR   1
 
#define LOGSTRING_VALUE   "LOG: %s %d\r\n"
 

Functions

uint32_t Log_start (uint32_t PortNum, uint32_t baudrate)
 
void Log_log (uint8_t severity, uint8_t logLevel, const char *restrict format,...)
 
void Log_slog (const char *restrict format,...)
 
void Log_level (uint8_t logLevel)
 

Macro Definition Documentation

#define LOGSTRING_VALUE   "LOG: %s %d\r\n"

Definition at line 22 of file Log.h.

#define LV_ERR   1
#define LV_INFO   2
#define LV_TRACE   3

Trace log level

Definition at line 19 of file Log.h.

Referenced by Log_level().

#define SCRLF   "\r\n"

Carriage Return Line Feed

Definition at line 17 of file Log.h.

Referenced by Log_log().

#define SERROR   "ERR->"

Error prefix

Definition at line 16 of file Log.h.

Referenced by Log_level().

#define SINFO   "INF->"

Information prefix

Definition at line 15 of file Log.h.

Referenced by Log_level().

#define STRACE   "TRC->"

Trace prefix

Definition at line 14 of file Log.h.

Referenced by Log_level(), and Log_slog().

Function Documentation

void Log_level ( uint8_t  logLevel)

Writes the selected log level prefix

Parameters
logLevelLog level message. (LV_TRACE, LV_INFO, LV_ERROR)

Definition at line 84 of file Log.c.

References LV_ERR, LV_INFO, LV_TRACE, PortNumLog, PrintF_print(), SERROR, SINFO, STRACE, and xMutexLOG.

Referenced by Log_log().

Here is the call graph for this function:

void Log_log ( uint8_t  severity,
uint8_t  logLevel,
const char *restrict  format,
  ... 
)

Writes the string format with the selected logLevel. If the severity level of the system chosen is greater than or equal to the level of log message then written

Parameters
severityLog level severity of the system.
logLevelLog level message. (LV_TRACE, LV_INFO, LV_ERROR)
formatString that contains a format string that follows the same specifications as format in printf.

Definition at line 61 of file Log.c.

References Log_level(), PortNumLog, PrintF_print(), SCRLF, and xMutexLOG.

Referenced by Wifly_ChangeBaudRate(), Wifly_close(), Wifly_ConfigAPMode(), Wifly_getChannel(), Wifly_getIp(), Wifly_getMac(), Wifly_getRSSI(), Wifly_getTime(), Wifly_getTx(), Wifly_getVer(), Wifly_getWlan(), Wifly_leave(), Wifly_logStart(), Wifly_open(), Wifly_ping(), Wifly_reset(), Wifly_start(), Wifly_WLANConfigConnect(), and Wifly_WLANConnect().

Here is the call graph for this function:

void Log_slog ( const char *restrict  format,
  ... 
)

Writes the string format selected

Parameters
formatString that contains a format string that follows the same specifications as format in printf.

Definition at line 48 of file Log.c.

References PortNumLog, PrintF_print(), STRACE, and xMutexLOG.

Here is the call graph for this function:

uint32_t Log_start ( uint32_t  PortNum,
uint32_t  baudrate 
)

Initialize UART port, and baud rate transmission.

Parameters
PortNumUART port number (0,1,2,3).
baudrateUART port Baud rate.
Returns
Returns the result of initialization. SUCCESS= TRUE, ERROR = FALSE.

Definition at line 28 of file Log.c.

References FALSE, NULL, PortNumLog, PrintF_start(), and xMutexLOG.

Referenced by Wifly_logStart().

Here is the call graph for this function: