?? hsmc.hec
字號:
/****************************************************************************
* File name : hsmc.hec
* Project : Smart Card for SySol ME
* Module : HSMC
* Date : 04/06/2003
* Version : 1.0
*---------------------------------------------------------------------------*
* Description :
* -------------
* Header file for declaration of constants provided to external modules
*----------------------------------------------------------------------------*
* EVOLUTION
*----------------------------------------------------------------------------*
* Date | Author | Description
*----------------------------------------------------------------------------*
* 04/06/2003 | M. SONDERMANN | Creation
*****************************************************************************/
#if !defined HSMC_HEC
#define HSMC_HEC
/****************************************************************************/
#if defined (PROCESS_SIM)
#undef PROCESS_SIM
#endif
#define PROCESS_SIM PROCESS_HSMC
/********************** Messages ********************************************/
enum
{
TDA_INIT = 0,
TDA_CARD_PRESENCE_ACTIVE,
TDA_CARD_PRESENCE_PASSIVE,
TDA_RESET_CARD,
TDA_DISCONNECT_CARD,
TDA_REQ_DATA_FROM_CARD,
TDA_SEND_DATA_TO_CARD,
TDA_ANSWER_FROM_CARD,
TDA_ERROR,
TDA_SET_CARD_CLOCK,
/**** This part is only here for compatibility with SIM ****/
MOBI_SIM_CARD_UNPLUG,
MOBI_SIM_CARD_PLUG,
/**** End of this part *************************************/
TDA_SET_CARD_SLEEP_MODE,
TDA_SET_CARD_POWER_DOWN
};
#define FF_TDA_INIT_REQ MC_PCC_FUNCTION_TYPE (TDA_INIT,PCC_T_REQ)
#define FF_TDA_CARD_PRESENCE_ACTIVE_IND MC_PCC_FUNCTION_TYPE (TDA_CARD_PRESENCE_ACTIVE,PCC_T_IND)
#define FF_TDA_CARD_PRESENCE_PASSIVE_IND MC_PCC_FUNCTION_TYPE (TDA_CARD_PRESENCE_PASSIVE,PCC_T_IND)
#define FF_TDA_RESET_CARD_REQ MC_PCC_FUNCTION_TYPE (TDA_RESET_CARD,PCC_T_REQ)
#define FF_TDA_RESET_CARD_CNF MC_PCC_FUNCTION_TYPE (TDA_RESET_CARD,PCC_T_CNF)
#define FF_TDA_DISCONNECT_CARD_REQ MC_PCC_FUNCTION_TYPE (TDA_DISCONNECT_CARD,PCC_T_REQ)
#define FF_TDA_DISCONNECT_CARD_CNF MC_PCC_FUNCTION_TYPE (TDA_DISCONNECT_CARD,PCC_T_CNF)
#define FF_TDA_REQ_DATA_FROM_CARD_REQ MC_PCC_FUNCTION_TYPE (TDA_REQ_DATA_FROM_CARD,PCC_T_REQ)
#define FF_TDA_SEND_DATA_TO_CARD_REQ MC_PCC_FUNCTION_TYPE (TDA_SEND_DATA_TO_CARD,PCC_T_REQ)
#define FF_TDA_ANSWER_FROM_CARD_CNF MC_PCC_FUNCTION_TYPE (TDA_ANSWER_FROM_CARD,PCC_T_CNF)
#define FF_TDA_ERROR_IND MC_PCC_FUNCTION_TYPE (TDA_ERROR,PCC_T_IND)
#define FF_TDA_SET_CARD_CLOCK_REQ MC_PCC_FUNCTION_TYPE (TDA_SET_CARD_CLOCK,PCC_T_REQ)
#define FF_TDA_SET_CARD_CLOCK_CNF MC_PCC_FUNCTION_TYPE (TDA_SET_CARD_CLOCK,PCC_T_CNF)
#define FF_TDA_SET_CARD_SLEEP_MODE_REQ MC_PCC_FUNCTION_TYPE (TDA_SET_CARD_SLEEP_MODE,PCC_T_REQ)
#define FF_TDA_SET_CARD_SLEEP_MODE_CNF MC_PCC_FUNCTION_TYPE (TDA_SET_CARD_SLEEP_MODE,PCC_T_CNF)
/**** This part is only here for compatibility with SIM ****/
#define FF_MOBI_SIM_CARD_UNPLUG_IND MC_PCC_FUNCTION_TYPE (MOBI_SIM_CARD_UNPLUG,PCC_T_IND)
#define FF_MOBI_SIM_CARD_PLUG_IND MC_PCC_FUNCTION_TYPE (MOBI_SIM_CARD_PLUG,PCC_T_IND)
/**** End of this part *************************************/
#define FF_TDA_SET_CARD_POWER_DOWN_REQ MC_PCC_FUNCTION_TYPE (TDA_SET_CARD_POWER_DOWN,PCC_T_REQ)
#define FF_TDA_SET_CARD_POWER_DOWN_CNF MC_PCC_FUNCTION_TYPE (TDA_SET_CARD_POWER_DOWN,PCC_T_CNF)
/**************************** Errors constants *****************************************/
#define TDA_PROTOCOL_ERROR_MASK 0xFF /* Only use by SAP, can be deleted */
#define TDA_CHIP_ERROR_MASK 0xFF /* Only use by SAP, can be deleted */
#define TDA_NO_ERROR 0x00 /* No Error */
#define TDA_ATR_FAILED 0x01 /* Bad response during ATR */
#define TDA_PTS_FAILED 0x02 /* Bad response during PPS */
#define TDA_PROCEDURE_BYTE_ERROR 0x03 /* Bad response during normale communication */
#define TDA_WTO 0x04 /* No response during normale communication */
/* Electronic error from chip TDA8003 */
#define TDA_MUTE 0x05 /* Card doesnn't send ATR */
#define TDA_EARLY 0x06 /* Card send ATR too quickly */
#define TDA_SUPL 0x07 /* VBAT falls on interface */
#define TDA_PROT 0x08 /* VBAT falls on interface */
#define TDA_ATR_FAILED_WTO 0x09 /* No response during ATR */
#define TDA_PTS_FAILED_WTO 0x0A /* No response during PPS */
#define TDA_PAR 0x0B /* Parity error */
#define TDA_PROCEDURE_BYTE_ERROR_ATR 0x0C /* We have probably receive the ATR
instead of a procedure byte */
/* LMSdv94298 - 20/08/03 - tcmc_wbm */
#if defined (SIM_HOT_PLUG_FTR)
#define TDA_SIM_CARD_MISSING 0x0D /* SAP must use the same constant */
#endif
/* End LMSdv94298 */
/*** Parameters for TDA_RESET_CARD_REQ and TDA_RESET_CARD_CNF message ***/
#define TDA_VOLTAGE_MASK 0x03
#define TDA_SIM5V (0<<0)
#define TDA_SIM3V (1<<0)
#define TDA_SIM1_8V (1<<1)
#define TDA_RESET_MASK 0x04
#define TDA_RESET_COLD (0<<2)
#define TDA_RESET_WARM (1<<2)
#define TDA_ATR_MASK 0x08
#define TDA_NO_ATR_RSP (0<<3)
#define TDA_ATR_RSP (1<<3)
/*** Parameters of TDA_SET_CARD_CLOCK_REQ message ***/
/****************************************************/
#define TDA_NORMAL_MASK 0x06
#define NORMAL_HIGH (1<<1) /* 01 = Fxtal/4 during the normal communication mode */
#define NORMAL_LOW (2<<1) /* 10 = Fxtal/8 during the normal communication mode */
#define TDA_SLEEP_MASK 0x18
#define SLEEP_LOW (0<<3) /* 00 = Clk stopped low during the sleep mode */
#define SLEEP_FINT (1<<3) /* 01 = Fint/2 during the sleep mode */
#define SLEEP_HIGH (2<<3) /* 10 = Clk stopped high during the sleep mode */
/*** Parameters of TDA_SET_POWER_DOWN_REQ message ***/
/****************************************************/
#define TDA_DISABLE_POWER_DOWN 0x00
#define TDA_ENABLE_POWER_DOWN 0x01
/***********************/
/* LENGTH OF STRUCTURE */
/***********************/
#define LGTH_T_MSG_HEADER sizeof (t_MsgHeader)
#define LGTH_T_TDA_HEADER_SIM_INSTRUCTION sizeof (t_TDAHeaderSIMInstruction)
#define LGTH_T_TDA_ANSWER_FROM_CARD_NO_DATA (LGTH_T_MSG_HEADER + 2)
#define LGTH_T_TDA_ANSWER_FROM_CARD_ONE_DATA (LGTH_T_TDA_ANSWER_FROM_CARD_NO_DATA + 1)
/******************************* Miscellaneous *******************************/
/******************************* Event ***************************************/
#define HSMC_INTERFACE_EVENT PROCESS_HSMC_EVENT_0_NUMBER
#define HSMC_INTERNAL_EVENT PROCESS_HSMC_EVENT_1_NUMBER
#define HSMC_INTERFACE_BIT ( 1 << PROCESS_HSMC_EVENT_0_NUMBER )
#define HSMC_INTERNAL_BIT ( 1 << PROCESS_HSMC_EVENT_1_NUMBER )
#endif /* HSMC_HEC */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -