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

Go to the source code of this file.

Macros

#define UART0PORT   0
 
#define UART1PORT   1
 
#define UART2PORT   2
 
#define UART3PORT   3
 
#define DEFBAUDRATE   9600
 

Functions

uint32_t PrintF_start (uint32_t portNum, uint32_t baudRate)
 
uint32_t PrintF_stop (uint32_t PortNum)
 
void PrintF_print (uint32_t portNum, const char *restrict format,...)
 
void PrintF_scan (uint8_t port, char *string, uint32_t timeout)
 
uint8_t PrintF_ChkScan (uint8_t portNum, char *strScan, char *strExp, uint32_t timeout)
 
void PrintF_ClBuffUart (uint8_t portNum)
 
void PrintF_delayMs (uint32_t ms)
 

Macro Definition Documentation

#define DEFBAUDRATE   9600

Definition at line 17 of file PrintF.h.

#define UART0PORT   0

Definition at line 13 of file PrintF.h.

Referenced by PrintF_ClBuffUart(), PrintF_print(), PrintF_scan(), PrintF_start(), and PrintF_stop().

#define UART1PORT   1

Definition at line 14 of file PrintF.h.

Referenced by PrintF_ClBuffUart(), PrintF_print(), PrintF_scan(), PrintF_start(), and PrintF_stop().

#define UART2PORT   2

Definition at line 15 of file PrintF.h.

Referenced by PrintF_ClBuffUart(), PrintF_print(), PrintF_scan(), PrintF_start(), and PrintF_stop().

#define UART3PORT   3

Definition at line 16 of file PrintF.h.

Referenced by PrintF_ClBuffUart(), PrintF_print(), PrintF_scan(), PrintF_start(), and PrintF_stop().

Function Documentation

uint8_t PrintF_ChkScan ( uint8_t  portNum,
char *  strScan,
char *  strExp,
uint32_t  timeout 
)

Llegeix la trama de la UART i la introdueix al parĂ metre String

Parameters
portNumUART port number (0,1,2,3).
strScanCharacter string received by the UART
strExpCharacter string that contains expected response.
timeoutWaiting time required to receive the answer
Returns
Returns if the received string is equal to the expected. SUCCESS= TRUE, ERROR = FALSE.

Definition at line 244 of file PrintF.c.

References FALSE, NULL, PrintF_ClBuffUart(), PrintF_scan(), and TRUE.

Referenced by Wifly_reset().

Here is the call graph for this function:

void PrintF_ClBuffUart ( uint8_t  portNum)

Initializes the UART port buffer chosen and the PrintF module

Parameters
portNumUART port number (0,1,2,3).

Definition at line 258 of file PrintF.c.

References BUFSIZE, clearBuffUart(), cUART0Buffer, cUART1Buffer, cUART2Buffer, cUART3Buffer, UART0PORT, UART1PORT, UART2PORT, and UART3PORT.

Referenced by PrintF_ChkScan(), and PrintF_print().

Here is the call graph for this function:

void PrintF_delayMs ( uint32_t  ms)

Time delay

Parameters
mstime delay (ms)

Definition at line 278 of file PrintF.c.

References delayMs().

Referenced by Wifly_ChangeBaudRate(), Wifly_reset(), Wifly_TCPTimeOpen(), Wifly_UDPReceive(), and Wifly_UDPSend().

Here is the call graph for this function:

void PrintF_print ( uint32_t  portNum,
const char *restrict  format,
  ... 
)

Write printf format string into the selected UART

Parameters
portNumUART port number (0,1,2,3).
formatstring that contains a format string that follows the same specifications as format in printf.

Definition at line 137 of file PrintF.c.

References cUART0Buffer, cUART1Buffer, cUART2Buffer, cUART3Buffer, NULL, PrintF_ClBuffUart(), UART0PORT, UART1PORT, UART2PORT, UART3PORT, UARTSend(), xMutexUART0, xMutexUART1, xMutexUART2, and xMutexUART3.

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

Here is the call graph for this function:

void PrintF_scan ( uint8_t  port,
char *  string,
uint32_t  timeout 
)

Read the response of the UART and moves it to the string parameter

Parameters
portUART port number (0,1,2,3).
stringCharacter string received by the UART
timeoutWaiting time required to receive the answer

Definition at line 206 of file PrintF.c.

References UART0PORT, UART1PORT, UART2PORT, UART3PORT, UARTReceive(), xMutexUART0, xMutexUART1, xMutexUART2, and xMutexUART3.

Referenced by PrintF_ChkScan().

Here is the call graph for this function:

uint32_t PrintF_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
Returns
Returns the result of initialisation. SUCCESS= TRUE, ERROR = FALSE.

Definition at line 27 of file PrintF.c.

References FALSE, NULL, TRUE, UART0PORT, UART1PORT, UART2PORT, UART3PORT, UARTInit(), xMutexUART0, xMutexUART1, xMutexUART2, and xMutexUART3.

Referenced by Log_start(), Wifly_ChangeBaudRate(), and Wifly_start().

Here is the call graph for this function:

uint32_t PrintF_stop ( uint32_t  PortNum)

Close UART port

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

Definition at line 91 of file PrintF.c.

References FALSE, TRUE, UART0PORT, UART1PORT, UART2PORT, UART3PORT, UARTClose(), xMutexUART0, xMutexUART1, xMutexUART2, and xMutexUART3.

Here is the call graph for this function: