/****************************************************************************
 *  F i l e   D a t a                                                        
 *  $Id: SNS_SensorsBoard_INFN.c,v 1.3 2004/08/27 13:30:39 alfarano Exp $
 *  $Revision: 1.3 $
 *  $Date: 2004/08/27 13:30:39 $
 *  $RCSfile: SNS_SensorsBoard_INFN.c,v $
 *                                                                           
 ****************************************************************************
 *  S W   D e v e l o p m e n t   E n v i r o n m e n t                      
 *                                                                           
 *  $Author: alfarano $
 *               :                                                           
 ****************************************************************************
 *  U p d a t i n g                                                          

 *  $Log: SNS_SensorsBoard_INFN.c,v $
 *  Revision 1.3  2004/08/27 13:30:39  alfarano
 *  cvs header
 *
 *  Revision 1.1  2003/10/03 16:12:26  faber
 *  *** empty log message ***
 *
 *                                                                           
 *****************************************************************************/
/*============================= Include File ================================*/


#include <src/INFN/LU_SourceFileID_INFN.h>
#define __FILEID__ _SNS_SensorsBoard_INFN__c
#include <src/INFN/PRH_ParamHandler_INFN.h>
#include <src/INFN/LU_LogUtility_INFN.h>
#include <src/INFN/PRH_ParamHandler_INFN_auto.h>
LU_DECL_MASK();
#include <src/INFN/CM_Common_INFN.h>
#include <src/INFN/SNS_SensorsBoard_INFN.h>
#include <src/INFN/HK_Manager_INFN.h>

/*============================ External define ================================*/

status_code SNS_Init() 
{
  return CM_RC_SUCCESSFUL;
}


status_code SNS_InitBoard() 
{
}


status_code SNS_ReadTemperature(SNS_TYPE SNS, UINT16* outbuf)
{
  UINT16 combuf;
  status_code status;
  
  combuf = (SNS << 13);
  
  status = HK_KHB_Cmd2FE(SNS,1,SNS_TEMP_REPLY_SIZE,&combuf,outbuf,SNS_BOARD_TIMEOUT);
  
  return status;
  
}

status_code SNS_ReadB(SNS_TYPE SNS,UINT16* outbuf)
{
  UINT16 combuf;
  status_code status;
  
  combuf = (SNS << 13) | (7 << 10);
  
  status = HK_KHB_Cmd2FE(SNS,1,SNS_B_REPLY_SIZE,&combuf,outbuf,SNS_BOARD_TIMEOUT);

  return status;
}
