/*
 * tci.h
 *
 *  Created on: 05.05.2010
 *      Author: galkag
 *  Revision #1 on April 28, 2013 by pning
 *    Removed the definitions of return codes from tci.h to avoid overloading the return codes.
 *    Return codes should always be defined in the Trustlet specific public header file.
 */

#ifndef TCI_H_
#define TCI_H_

#include "stdint.h"
typedef uint32_t tciCommandId_t;
typedef uint32_t tciResponseId_t;
typedef uint32_t tciReturnCode_t;

/* Responses have bit 31 set */
#define RSP_ID_MASK (1U << 31)
#define RSP_ID(cmdId) (((uint32_t)(cmdId)) | RSP_ID_MASK)
#define IS_CMD(cmdId) ((((uint32_t)(cmdId)) & RSP_ID_MASK) == 0)
#define IS_RSP(cmdId) ((((uint32_t)(cmdId)) & RSP_ID_MASK) == RSP_ID_MASK)

#endif /* TCI_H_ */
