-39
(2) Select Operation Mode
“Operation Mode:” selects “passive” or “active”. Then click “Apply” button to apply setting.
“Mode:” selects “passive” or “active”, it executes the following code.
void CWinceDEMODlg::OnCbnSelchangeComboOpmode()
{
//
TODO:
在此加入控制項告知處理常式程式碼
CString
sTemp,sTemp2;
BYTE
byTemp=0;
if(SUNLITRFID_IsOpen())
{
SUNLITRFID_Pause();
ListMsg.InsertString(0,CString("Pause Device!!!")) ;
SUNLITRFID_ActiveScanIntervalSet(DEFAULT_SCAN_INTERVAL_10MS);
//---------------------------------------------------------------------------
//Set
Operation
Mode
if( ComboBoxOPMode.GetCurSel()==0) byTemp=0;//Passive Mode
else byTemp=0xff;//Active Mode
if(SUNLITRFID_OpModeSet(byTemp)==HANDLE_SUCCESS)
ListMsg.InsertString(0,CString("Set Operation Mode Successed!!!")) ;
else
ListMsg.InsertString(0,CString("Set Operation Mode Fail...")) ;
//---------------------------------------------------------------------------
if(ButtonMute.GetCheck()==BST_UNCHECKED)
MessageBeep(MB_ICONASTERISK);
}
else
{
ListMsg.InsertString(0,CString("Comport Error...")) ;
if(ButtonMute.GetCheck()==BST_UNCHECKED)
MessageBeep(MB_OK);
}
}