/*
 *
 * Copyright (C) 2012-2019, Samsung Electronics Co., Ltd.
 *
 * Debug header file for secure driver
 */

#ifndef __DBG_H__
#define __DBG_H__

#include <print_no_alloc.h>
#include <tee_internal_api.h>

#undef DR_DBGLOG
#define DR_INFOLOG
#define DR_ERRLOG

#define DUMMY_FUNCTION() do {} while (0)

#define tuiPrintf(format, args ...) printf_no_alloc(format, ##args);

#ifdef DR_DBGLOG
#define dbgPrintf(format, args ...) tuiPrintf(" " format, ##args)
#else
#define dbgPrintf(format, args ...) DUMMY_FUNCTION()
#endif /* DR_DBGLOG */

#ifdef DR_INFOLOG
#define infoPrintf(format, args ...) tuiPrintf("INFO : " format, ##args)
#else
#define infoPrintf(format, args ...) DUMMY_FUNCTION()
#endif /* DR_DBGLOG */

#ifdef DR_ERRLOG
#define errPrintf(format, args ...) tuiPrintf("ERROR : %s:%d : " format, \
                                              __func__, __LINE__, ##args)
#else
#define errPrintf(format, args ...) DUMMY_FUNCTION()
#endif /* DR_ERRLOG */

#endif /* __DBG_H__ */