Nisarg Sheth / ADMX2001

Message.h

Committer:
nsheth
Date:
2021-10-05
Revision:
3:81d1980d45aa

File content as of revision 3:81d1980d45aa:

/******************************************************************************
 Copyright (c) 2020 - 2021  Analog Devices Inc. All Rights Reserved.
 This software is proprietary & confidential to Analog Devices, Inc.
 and its licensors.
******************************************************************************/
/**
 *  @file   message.h
 *  @brief  Defines for message
 * @{
 */

#ifndef __MESSAGE_H__
#define __MESSAGE_H__

/*============= I N C L U D E S =============*/
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
/*============= D E F I N E S =============*/
/** Maximum message size value */
#define MAX_MSG_SIZE 128

/** No Warning */
#define NO_WARN 0
/** DDS & NCO Frequency are not equal warning */
#define DDS_NCO_FREQ_WARN 1
/** Calibration failed warning */
#define CAL_LOAD_FAIL_WARN 2
/** Autorange disabled warning */
#define AUTORANGE_DISABLE_WARN 4
/** Autorange failed warning */
#define AUTORANGE_FAIL_WARN 8
/** Sweep count warning */
#define SWEEPCOUNT_WARN 16
/** Magnitude limit warning */
#define MAG_EXCEED_WARN 32
/** Offset limit warning */
#define OFFSET_LIMITED_WARN 64
/** Positive offset exceed warning */
#define OFFSET_POS_EXCEED_WARN 128
/** Negative offset exceed warning */
#define OFFSET_NEG_EXCEED_WARN 256

//#define ENABLE_DEBUG

/** Prints Info  Message */
#define INFO_MSG(...) printf("", __VA_ARGS__);
/** Prints warn message */
#define WARN_MSG(...) printf("Warn : ", __VA_ARGS__);
/** Prints error message */
#define ERROR_MSG(...) printf("Error : ", __VA_ARGS__);

#endif /* __MESSAGE_H__ */

/**
 * @}
 */