Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: RFAL ST25R3911 BSP05
source/logger.h
- Committer:
- DiegoOstuni
- Date:
- 2019-11-14
- Revision:
- 2:2039176639b9
- Parent:
- 1:86504e1ac6b1
File content as of revision 2:2039176639b9:
/******************************************************************************
* @attention
*
* <h2><center>© COPYRIGHT 2016 STMicroelectronics</center></h2>
*
* Licensed under ST MYLIBERTY SOFTWARE LICENSE AGREEMENT (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.st.com/myliberty
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
* AND SPECIFICALLY DISCLAIMING THE IMPLIED WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************/
/*
* PROJECT:
* $Revision: $
* LANGUAGE: ANSI C
*/
/*! \file
*
* \author
*
* \brief serial output log declaration file
*
*/
/*!
*
* This driver provides a printf-like way to output log messages
* via the UART interface. It makes use of the uart driver.
*
* API:
* - Write a log message to UART output: #DEBUG
*/
#ifndef LOGGER_H
#define LOGGER_H
/*
******************************************************************************
* INCLUDES
******************************************************************************
*/
#include "platform1.h"
/*
******************************************************************************
* DEFINES
******************************************************************************
*/
#define LOGGER_ON 1
#define LOGGER_OFF 0
/*!
*****************************************************************************
* \brief Writes out a formated string via UART interface
*
* This function is used to write a formated string via the UART interface.
*
*****************************************************************************
*/
extern void logUsartInit(UART_HandleTypeDef *husart);
/*!
*****************************************************************************
* \brief Writes out a formated string via UART interface
*
* This function is used to write a formated string via the UART interface.
*
*****************************************************************************
*/
extern int logUsart(const char* format, ...);
/*!
*****************************************************************************
* \brief helper to convert hex data into formated string
*
* \param[in] data : pointer to buffer to be dumped.
*
* \param[in] dataLen : buffer length
*
* \return hex formated string
*
*****************************************************************************
*/
extern char* hex2Str(unsigned char * data, size_t dataLen);
#endif /* LOGGER_H */