#include <stdlib.h>
#include <string.h>
#include "FreeRTOS.h"
#include "task.h"
#include "serial.h"
#include "tracedump.h"
Macros | |
#define | dumpCOM2_BAUDRATE ( ( unsigned portLONG ) 57600 ) |
Baud rate used by the serial port 2. More... | |
#define | dumpCOM2_BUFFER_LEN ( ( unsigned portLONG ) 64 ) |
COM Port2 buffer length. More... | |
#define | DUMPCOM2_NO_BLOCK ( ( portTickType ) 0 ) |
#define | TRACE_MSG_BANNER "\x0C\r\n---------- Traces Dump \r\n" |
Banner printed on the dump port. More... | |
Functions | |
int | itracedump_Init (void) |
unsigned portSHORT | ustracedump_Print (const signed portCHAR *const pcString) |
void | v_tracedump_stopResources (void) |
Stop the tracedump module resources. More... | |
void | vtracedump_PrintBlocking (const signed portCHAR *const pcString) |
void | vtracedump_Putchar (signed portCHAR cByte) |
Put a char to the dump port. More... | |
void | vtracedump_Putchar_Block (signed portCHAR cByte) |
Put a char to the dump port. More... | |
Variables | |
static xComPortHandle | xComPort2Hndl = (xComPortHandle)NULL |
COM Port2 handle. More... | |
#define dumpCOM2_BAUDRATE ( ( unsigned portLONG ) 57600 ) |
Baud rate used by the serial port 2.
Referenced by itracedump_Init().
#define dumpCOM2_BUFFER_LEN ( ( unsigned portLONG ) 64 ) |
COM Port2 buffer length.
Referenced by itracedump_Init().
#define DUMPCOM2_NO_BLOCK ( ( portTickType ) 0 ) |
Referenced by vtracedump_Putchar().
#define TRACE_MSG_BANNER "\x0C\r\n---------- Traces Dump \r\n" |
Banner printed on the dump port.
Referenced by itracedump_Init().
int itracedump_Init | ( | void | ) |
This function initializes the dump port.
References DUMP_FAILURE, DUMP_SUCCESS, dumpCOM2_BAUDRATE, dumpCOM2_BUFFER_LEN, serCOM2, TRACE_MSG_BANNER, vtracedump_PrintBlocking(), xComPort2Hndl, and xUsartInit().
Referenced by portTASK_FUNCTION().
unsigned portSHORT ustracedump_Print | ( | const signed portCHAR *const | pcString | ) |
Send a string of characters to the dump port.
pcString | The string to dump |
References usUsartPutString(), and xComPort2Hndl.
Stop the tracedump module resources.
References vSerialClose(), and xComPort2Hndl.
Referenced by e_syscmds_reboot().
void vtracedump_PrintBlocking | ( | const signed portCHAR *const | pcString | ) |
Send a string of characters to the dump port.
pcString | The string to dump |
References usUsartPutString(), and xComPort2Hndl.
Referenced by itracedump_Init().
void vtracedump_Putchar | ( | signed portCHAR | cByte | ) |
Put a char to the dump port.
cByte | The character to put |
References DUMPCOM2_NO_BLOCK, xComPort2Hndl, and xUsartPutChar().
void vtracedump_Putchar_Block | ( | signed portCHAR | cByte | ) |
Put a char to the dump port.
cByte | The character to put |
References xComPort2Hndl, and xUsartPutChar().
|
static |
COM Port2 handle.
Referenced by itracedump_Init(), ustracedump_Print(), v_tracedump_stopResources(), vtracedump_PrintBlocking(), vtracedump_Putchar(), and vtracedump_Putchar_Block().