Wifly Driver  V1.0
Macros | Functions | Variables
Log.c File Reference
#include "LPC17xx.h"
#include "stdio.h"
#include "stdlib.h"
#include <string.h>
#include <stdarg.h>
#include "FreeRTOS.h"
#include "semphr.h"
#include "Type.h"
#include "Config.h"
#include "PrintF.h"
#include "Log.h"
Include dependency graph for Log.c:

Go to the source code of this file.

Macros

#define LOGBUFSIZE   (BUFSIZE_DEBUG)
 

Functions

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

Variables

uint32_t PortNumLog
 
char string [LOGBUFSIZE]
 
xSemaphoreHandle xMutexLOG
 

Macro Definition Documentation

#define LOGBUFSIZE   (BUFSIZE_DEBUG)

Definition at line 22 of file Log.c.

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:

Variable Documentation

uint32_t PortNumLog

Stores the UART port number

Definition at line 24 of file Log.c.

Referenced by Log_level(), Log_log(), Log_slog(), and Log_start().

char string[LOGBUFSIZE]

Log Buffer to stores the information to send

Definition at line 25 of file Log.c.

Referenced by Arpalab_receiveValue(), Wifly_getChannel(), Wifly_getIp(), Wifly_getMac(), Wifly_getRSSI(), Wifly_getTime(), Wifly_getTx(), Wifly_getVer(), Wifly_getWlan(), and Wifly_showConnection().

xSemaphoreHandle xMutexLOG

Log semaphore Handle

Definition at line 26 of file Log.c.

Referenced by Log_level(), Log_log(), Log_slog(), and Log_start().