Example application for the STMicroelectronics X-NUCLEO-NFC05A1

Dependencies:   RFAL ST25R3911 BSP05

Embed: (wiki syntax)

« Back to documentation index

logger.cpp File Reference

logger.cpp File Reference

Debug log output utility implementation. More...

Go to the source code of this file.

Functions

uint8_t logUsartTx (uint8_t *data, uint16_t dataLen)
 This function Transmit data via USART.
void logUsartInit (UART_HandleTypeDef *husart)
 This function initalize the UART handle.
int logUsart (const char *format,...)
 Writes out a formated string via UART interface.
char * hex2Str (unsigned char *data, size_t dataLen)
 helper to convert hex data into formated string

Detailed Description

Debug log output utility implementation.

Author:

Definition in file logger.cpp.


Function Documentation

char* hex2Str ( unsigned char *  data,
size_t  dataLen 
)

helper to convert hex data into formated string

Parameters:
[in]data: pointer to buffer to be dumped.
[in]dataLen: buffer length
Returns:
hex formated string

Definition at line 115 of file logger.cpp.

int logUsart ( const char *  format,
  ... 
)

Writes out a formated string via UART interface.

This function is used to write a formated string via the UART interface.

Definition at line 91 of file logger.cpp.

void logUsartInit ( UART_HandleTypeDef *  husart )

This function initalize the UART handle.

Writes out a formated string via UART interface.

Parameters:
husart: already initalized handle to USART HW
Return values:
none:

Definition at line 71 of file logger.cpp.

uint8_t logUsartTx ( uint8_t *  data,
uint16_t  dataLen 
)

This function Transmit data via USART.

Parameters:
data: data to be transmitted
dataLen: length of data to be transmitted
Return values:
ERR_INVALID_HANDLE: in case the SPI HW is not initalized yet
others: HAL status

Definition at line 83 of file logger.cpp.