| 1 |
/**************************************************************************** |
| 2 |
* F i l e D a t a |
| 3 |
* $Id: HV_INFN.c,v 1.3 2005/02/21 08:58:29 sebastiani Exp $ |
| 4 |
* $Revision: 1.3 $ |
| 5 |
* $Date: 2005/02/21 08:58:29 $ |
| 6 |
* $RCSfile: HV_INFN.c,v $ |
| 7 |
* |
| 8 |
**************************************************************************** |
| 9 |
* S W D e v e l o p m e n t E n v i r o n m e n t |
| 10 |
* |
| 11 |
* $Author: sebastiani $ |
| 12 |
* : |
| 13 |
**************************************************************************** |
| 14 |
* U p d a t i n g |
| 15 |
|
| 16 |
* $Log: HV_INFN.c,v $ |
| 17 |
* Revision 1.3 2005/02/21 08:58:29 sebastiani |
| 18 |
* all log comments completed |
| 19 |
* |
| 20 |
* Revision 1.2 2004/08/27 13:30:39 alfarano |
| 21 |
* cvs header |
| 22 |
* |
| 23 |
* Revision 1.1 2003/10/03 16:12:26 faber |
| 24 |
* *** empty log message *** |
| 25 |
* |
| 26 |
* |
| 27 |
*****************************************************************************/ |
| 28 |
/*============================= Include File ================================*/ |
| 29 |
|
| 30 |
|
| 31 |
#include <src/INFN/LU_SourceFileID_INFN.h> |
| 32 |
#define __FILEID__ _HV_INFN__c |
| 33 |
|
| 34 |
#include <src/INFN/PRH_ParamHandler_INFN.h> |
| 35 |
#include <src/INFN/LU_LogUtility_INFN.h> |
| 36 |
#include <src/INFN/PRH_ParamHandler_INFN_auto.h> |
| 37 |
LU_DECL_MASK(); |
| 38 |
|
| 39 |
#include <src/INFN/CM_Common_INFN.h> |
| 40 |
#include <src/INFN/KHB_Driver_INFN.h> |
| 41 |
#include <src/INFN/HK_Manager_INFN.h> |
| 42 |
#include <src/INFN/HV_INFN.h> |
| 43 |
|
| 44 |
|
| 45 |
/*============================ Global define ================================*/ |
| 46 |
|
| 47 |
|
| 48 |
/*============================== global types ==============================*/ |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
/*=========================== Structure define ==============================*/ |
| 55 |
|
| 56 |
|
| 57 |
/*============================ Enumerate define =============================*/ |
| 58 |
|
| 59 |
|
| 60 |
status_code HV_Init() |
| 61 |
{ |
| 62 |
return CM_RC_SUCCESSFUL; |
| 63 |
} |
| 64 |
|
| 65 |
status_code HV_Initialization() |
| 66 |
{ |
| 67 |
return CM_RC_SUCCESSFUL; |
| 68 |
} |
| 69 |
|
| 70 |
status_code HV_Write(BYTE channel, BYTE value) |
| 71 |
{ |
| 72 |
status_code status; |
| 73 |
UINT16 write_value,outbuf; |
| 74 |
|
| 75 |
if (channel <= HV_MAX_CHANNEL) |
| 76 |
{ |
| 77 |
write_value = (1 << 15) | (1 << 14) | ((UINT16)channel << 10) | ((UINT16)value << 7) | ((UINT16)channel << 3) | value; |
| 78 |
|
| 79 |
status = HK_KHB_Cmd2FE(KHB_POWER_SUPPLY,1,1,&write_value,&outbuf,HV_BOARD_TIMEOUT); |
| 80 |
|
| 81 |
if (status = CM_RC_SUCCESSFUL) |
| 82 |
{ |
| 83 |
// TBD check CC |
| 84 |
} |
| 85 |
} |
| 86 |
else |
| 87 |
status = CM_RC_INVALID_ID; |
| 88 |
/*@LOG HV_Write trace - status */ |
| 89 |
LU_INFN_LOG (LU_DEBUG_TRACE, LU_MASK(__FILEID__), __FILEID__, __LINE__, status); |
| 90 |
return status; |
| 91 |
} |