Wifly Driver
V1.0
|
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) |
#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().
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
portNum | UART port number (0,1,2,3). |
strScan | Character string received by the UART |
strExp | Character string that contains expected response. |
timeout | Waiting time required to receive the answer |
Definition at line 244 of file PrintF.c.
References FALSE, NULL, PrintF_ClBuffUart(), PrintF_scan(), and TRUE.
Referenced by Wifly_reset().
void PrintF_ClBuffUart | ( | uint8_t | portNum | ) |
Initializes the UART port buffer chosen and the PrintF module
portNum | UART 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().
void PrintF_delayMs | ( | uint32_t | ms | ) |
Time delay
ms | time 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().
void PrintF_print | ( | uint32_t | portNum, |
const char *restrict | format, | ||
... | |||
) |
Write printf format string into the selected UART
portNum | UART port number (0,1,2,3). |
format | string 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().
void PrintF_scan | ( | uint8_t | port, |
char * | string, | ||
uint32_t | timeout | ||
) |
Read the response of the UART and moves it to the string parameter
port | UART port number (0,1,2,3). |
string | Character string received by the UART |
timeout | Waiting 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().
uint32_t PrintF_start | ( | uint32_t | portNum, |
uint32_t | baudRate | ||
) |
Initialize UART port, and baud rate transmission.
portNum | UART port number (0,1,2,3). |
baudRate | UART port Baud |
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().
uint32_t PrintF_stop | ( | uint32_t | PortNum | ) |
Close UART port
PortNum | UART port number (0,1,2,3). |
Definition at line 91 of file PrintF.c.
References FALSE, TRUE, UART0PORT, UART1PORT, UART2PORT, UART3PORT, UARTClose(), xMutexUART0, xMutexUART1, xMutexUART2, and xMutexUART3.