OPTIGA Trust M  1.1.0
C++ library for Optiga Trust M Chip Security Controller
pal_logger_arduino.cpp File Reference

This file provides the prototypes declarations for pal logger. More...

#include <Arduino.h>
#include "pal_logger.h"
Include dependency graph for pal_logger_arduino.cpp:
pal_logger_t logger_console
 
pal_status_t pal_logger_init (void *p_logger_context)
 Initializes the logger port. More...
 
pal_status_t pal_logger_deinit (void *p_logger_context)
 De-Initializes the logger port. More...
 
pal_status_t pal_logger_write (void *p_logger_context, const uint8_t *p_log_data, uint32_t log_data_length)
 Writes to logger port. More...
 
pal_status_t pal_logger_read (void *p_logger_context, uint8_t *p_log_data, uint32_t log_data_length)
 Read to logger port. More...
 

Detailed Description

This file provides the prototypes declarations for pal logger.

Copyright (c) 2019 Infineon Technologies AG

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

\endcopyright

Author
Infineon Technologies AG

Function Documentation

◆ pal_logger_deinit()

pal_status_t pal_logger_deinit ( void *  p_logger_context)

De-Initializes the logger port.

De-Initializes the logger port.

  • Clears the structure low level logging.
Precondition
  • None.
Note
  • None
Parameters
[in]p_logger_contextValid pointer to the PAL logger context that should be initialized
Return values
PAL_STATUS_SUCCESSIn case of successfully written to logger
PAL_STATUS_FAILUREIn case of failure while writing to logger

◆ pal_logger_init()

pal_status_t pal_logger_init ( void *  p_logger_context)

Initializes the logger port.

Initializes the logger port.

  • Creates and initializes structure low level logging.
Precondition
  • None.
Note
  • None
Parameters
[in]p_logger_contextValid pointer to the PAL logger context that should be initialized
Return values
PAL_STATUS_SUCCESSIn case of successfully written to logger
PAL_STATUS_FAILUREIn case of failure while writing to logger

◆ pal_logger_read()

pal_status_t pal_logger_read ( void *  p_logger_context,
uint8_t *  p_log_data,
uint32_t  log_data_length 
)

Read to logger port.

Reads to logger port.

  • Invokes the platform dependent function to log the information provided.
Precondition
Note
  • None
Parameters
[in]p_logger_contextValid pointer to the PAL logger context that should be initialized
[in]p_log_dataPointer to the log data (data to be logged)
[in]log_data_lengthLength of data to be logged.
Return values
PAL_STATUS_SUCCESSIn case of successfully read to logger
PAL_STATUS_FAILUREIn case of failure while read to logger

◆ pal_logger_write()

pal_status_t pal_logger_write ( void *  p_logger_context,
const uint8_t *  p_log_data,
uint32_t  log_data_length 
)

Writes to logger port.

Writes to logger port.

  • Invokes the platform dependent function to log the information provided.
Precondition
Note
  • None
Parameters
[in]p_logger_contextValid pointer to the PAL logger context that should be initialized
[in]p_log_dataPointer to the log data (data to be logged)
[in]log_data_lengthLength of data to be logged.
Return values
PAL_STATUS_SUCCESSIn case of successfully written to logger
PAL_STATUS_FAILUREIn case of failure while writing to logger

Variable Documentation

◆ logger_console

pal_logger_t logger_console
Initial value:
=
{
NULL,
false,
false,
}