form_RFMT6140CReg.cpp
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:127k
- /*****************************************************************************
- * Copyright Statement:
- * --------------------
- * This software is protected by Copyright and the information contained
- * herein is confidential. The software may not be copied and the information
- * contained herein may not be used or disclosed except with the written
- * permission of MediaTek Inc. (C) 2005
- *
- * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
- * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
- * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
- * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
- * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
- * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
- * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
- * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
- * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
- * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
- *
- * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
- * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
- * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
- * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
- * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
- *
- * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
- * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
- * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
- * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
- * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
- *
- *****************************************************************************/
- /*****************************************************************************
- *
- * Filename:
- * ---------
- * form_RFMT6140CReg.cpp
- *
- * Project:
- * --------
- * Maui META APP
- *
- * Description:
- * ------------
- * MT6140C register read/write form source
- *
- * Author:
- * -------
- * Andy Ueng (mtk00490)
- *
- *============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * $Revision$
- * $Modtime$
- * $Log$
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- //---------------------------------------------------------------------------
- #include <vcl.h>
- #pragma hdrstop
- #ifndef _MISC_H_
- #include "misc.h"
- #endif
- // form
- #include "form_RFMT6140CReg.h"
- #ifndef _FORM_MAIN_H_
- #include "form_main.h"
- #endif
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- #pragma resource "*.dfm"
- TfrmMT6140CReg *frmMT6140CReg;
- //===========================================================================
- static void CNF_GetMT6140AllFromReg( void )
- { frmMT6140CReg->CNF_GetMT6140AllFromReg();
- }
- //---------------------------------------------------------------------------
- static void CNF_SetMT6140AllToReg( void )
- { frmMT6140CReg->CNF_SetMT6140AllToReg();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- static void CNF_GetMT6140CW0FromReg( void )
- {
- frmMT6140CReg->CNF_GetMT6140CW0FromReg();
- }
- //---------------------------------------------------------------------------
- static void CNF_SetMT6140CW0ToReg( void )
- {
- frmMT6140CReg->CNF_SetMT6140CW0ToReg();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- static void CNF_GetMT6140CW1FromReg( void )
- {
- frmMT6140CReg->CNF_GetMT6140CW1FromReg();
- }
- //---------------------------------------------------------------------------
- static void CNF_SetMT6140CW1ToReg( void )
- {
- frmMT6140CReg->CNF_SetMT6140CW1ToReg();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- static void CNF_GetMT6140CW2FromReg( void )
- {
- frmMT6140CReg->CNF_GetMT6140CW2FromReg();
- }
- //---------------------------------------------------------------------------
- static void CNF_SetMT6140CW2ToReg( void )
- {
- frmMT6140CReg->CNF_SetMT6140CW2ToReg();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- static void CNF_GetMT6140CW3FromReg( void )
- {
- frmMT6140CReg->CNF_GetMT6140CW3FromReg();
- }
- //---------------------------------------------------------------------------
- static void CNF_SetMT6140CW3ToReg( void )
- {
- frmMT6140CReg->CNF_SetMT6140CW3ToReg();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- static void CNF_GetMT6140CW4FromReg( void )
- {
- frmMT6140CReg->CNF_GetMT6140CW4FromReg();
- }
- //---------------------------------------------------------------------------
- static void CNF_SetMT6140CW4ToReg( void )
- {
- frmMT6140CReg->CNF_SetMT6140CW4ToReg();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- static void CNF_GetMT6140CW5FromReg( void )
- {
- frmMT6140CReg->CNF_GetMT6140CW5FromReg();
- }
- //---------------------------------------------------------------------------
- static void CNF_SetMT6140CW5ToReg( void )
- {
- frmMT6140CReg->CNF_SetMT6140CW5ToReg();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- static void CNF_GetMT6140CW6FromReg( void )
- {
- frmMT6140CReg->CNF_GetMT6140CW6FromReg();
- }
- //---------------------------------------------------------------------------
- static void CNF_SetMT6140CW6ToReg( void )
- {
- frmMT6140CReg->CNF_SetMT6140CW6ToReg();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- static void CNF_GetMT6140CW7FromReg( void )
- {
- frmMT6140CReg->CNF_GetMT6140CW7FromReg();
- }
- //---------------------------------------------------------------------------
- static void CNF_SetMT6140CW7ToReg( void )
- {
- frmMT6140CReg->CNF_SetMT6140CW7ToReg();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- static void CNF_GetMT6140CW8FromReg( void )
- {
- frmMT6140CReg->CNF_GetMT6140CW8FromReg();
- }
- //---------------------------------------------------------------------------
- static void CNF_SetMT6140CW8ToReg( void )
- {
- frmMT6140CReg->CNF_SetMT6140CW8ToReg();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- static void CNF_GetMT6140CW9FromReg( void )
- {
- frmMT6140CReg->CNF_GetMT6140CW9FromReg();
- }
- //---------------------------------------------------------------------------
- static void CNF_SetMT6140CW9ToReg( void )
- {
- frmMT6140CReg->CNF_SetMT6140CW9ToReg();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- static void CNF_GetMT6140CW10FromReg( void )
- {
- frmMT6140CReg->CNF_GetMT6140CW10FromReg();
- }
- //---------------------------------------------------------------------------
- static void CNF_SetMT6140CW10ToReg( void )
- {
- frmMT6140CReg->CNF_SetMT6140CW10ToReg();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- static void CNF_GetMT6140CW11FromReg( void )
- {
- frmMT6140CReg->CNF_GetMT6140CW11FromReg();
- }
- //---------------------------------------------------------------------------
- static void CNF_SetMT6140CW11ToReg( void )
- {
- frmMT6140CReg->CNF_SetMT6140CW11ToReg();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- static void CNF_GetMT6140CW15FromReg( void )
- {
- frmMT6140CReg->CNF_GetMT6140CW15FromReg();
- }
- //---------------------------------------------------------------------------
- static void CNF_SetMT6140CW15ToReg( void )
- {
- frmMT6140CReg->CNF_SetMT6140CW15ToReg();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- //---------------------------------------------------------------------------
- __fastcall TfrmMT6140CReg::TfrmMT6140CReg(TComponent* Owner)
- : TForm(Owner)
- {
- m_edtCW0AFC[0] = edtCW0AFC0;
- m_edtCW0AFC[1] = edtCW0AFC1;
- m_edtCW0AFC[2] = edtCW0AFC2;
- m_edtCW0AFC[3] = edtCW0AFC3;
- m_edtCW0AFC[4] = edtCW0AFC4;
- m_edtCW0AFC[5] = edtCW0AFC5;
- m_edtCW0SYNCP[0] = edtCW0SYNCP0;
- m_edtCW0SYNCP[1] = edtCW0SYNCP1;
- m_edtCW1BAND[0] = edtCW1BAND0;
- m_edtCW1BAND[1] = edtCW1BAND1;
- m_edtCW1N_INTEGER[0] = edtCW1N_INTEGER0;
- m_edtCW1N_INTEGER[1] = edtCW1N_INTEGER1;
- m_edtCW1N_INTEGER[2] = edtCW1N_INTEGER2;
- m_edtCW1N_INTEGER[3] = edtCW1N_INTEGER3;
- m_edtCW1N_INTEGER[4] = edtCW1N_INTEGER4;
- m_edtCW1N_INTEGER[5] = edtCW1N_INTEGER5;
- m_edtCW1N_INTEGER[6] = edtCW1N_INTEGER6;
- m_edtCW1N_FRACTION[0] = edtCW1N_FRACTION0;
- m_edtCW1N_FRACTION[1] = edtCW1N_FRACTION1;
- m_edtCW1N_FRACTION[2] = edtCW1N_FRACTION2;
- m_edtCW1N_FRACTION[3] = edtCW1N_FRACTION3;
- m_edtCW1N_FRACTION[4] = edtCW1N_FRACTION4;
- m_edtCW1N_FRACTION[5] = edtCW1N_FRACTION5;
- m_edtCW1N_FRACTION[6] = edtCW1N_FRACTION6;
- m_edtCW1N_FRACTION[7] = edtCW1N_FRACTION7;
- m_edtCW2DC_DAC_AI[0] = edtCW2DC_DAC_AI0;
- m_edtCW2DC_DAC_AI[1] = edtCW2DC_DAC_AI1;
- m_edtCW2DC_DAC_AI[2] = edtCW2DC_DAC_AI2;
- m_edtCW2DC_DAC_AI[3] = edtCW2DC_DAC_AI3;
- m_edtCW2DC_DAC_AI[4] = edtCW2DC_DAC_AI4;
- m_edtCW2DC_DAC_AI[5] = edtCW2DC_DAC_AI5;
- m_edtCW2DC_DAC_AQ[0] = edtCW2DC_DAC_AQ0;
- m_edtCW2DC_DAC_AQ[1] = edtCW2DC_DAC_AQ1;
- m_edtCW2DC_DAC_AQ[2] = edtCW2DC_DAC_AQ2;
- m_edtCW2DC_DAC_AQ[3] = edtCW2DC_DAC_AQ3;
- m_edtCW2DC_DAC_AQ[4] = edtCW2DC_DAC_AQ4;
- m_edtCW2DC_DAC_AQ[5] = edtCW2DC_DAC_AQ5;
- m_edtCW2MODE[0] = edtCW2MODE0;
- m_edtCW2MODE[1] = edtCW2MODE1;
- m_edtCW2GAIN_TABLE[0] = edtCW2GAIN_TABLE0;
- m_edtCW2GAIN_TABLE[1] = edtCW2GAIN_TABLE1;
- m_edtCW2GAIN_TABLE[2] = edtCW2GAIN_TABLE2;
- m_edtCW2GAIN_TABLE[3] = edtCW2GAIN_TABLE3;
- m_edtCW2GAIN_TABLE[4] = edtCW2GAIN_TABLE4;
- m_edtCW2GAIN_TABLE[5] = edtCW2GAIN_TABLE5;
- m_edtCW4CAL_DELAY[0] = edtCW4CAL_DELAY0;
- m_edtCW4CAL_DELAY[1] = edtCW4CAL_DELAY1;
- m_edtCW4VCO_VSET[0] = edtCW4VCO_VSET0;
- m_edtCW4VCO_VSET[1] = edtCW4VCO_VSET1;
-
- m_edtCW4CALMODE[0] = edtCW4CALMODE0;
- m_edtCW4CALMODE[1] = edtCW4CALMODE1;
- m_edtCW4SYNPFD[0] = edtCW4SYNPFD0;
- m_edtCW4SYNPFD[1] = edtCW4SYNPFD1;
- m_edtCW5RESB[0] = edtCW5RESB0;
- m_edtCW5RESB[1] = edtCW5RESB1;
- m_edtCW5RESB[2] = edtCW5RESB2;
- m_edtCW5RESB[3] = edtCW5RESB3;
- m_edtCW5RESB[4] = edtCW5RESB4;
- m_edtCW5RES[0] = edtCW5RES0;
- m_edtCW5RES[1] = edtCW5RES1;
- m_edtCW5RES[2] = edtCW5RES2;
- m_edtCW5RES[3] = edtCW5RES3;
- m_edtCW5RES[4] = edtCW5RES4;
- m_edtCW6VCO_SCA[0] = edtCW6VCO_SCA0;
- m_edtCW6VCO_SCA[1] = edtCW6VCO_SCA1;
- m_edtCW6VCO_SCA[2] = edtCW6VCO_SCA2;
- m_edtCW6VCO_SCA[3] = edtCW6VCO_SCA3;
- m_edtCW6VCO_SCA[4] = edtCW6VCO_SCA4;
- m_edtCW6VCO_SCA[5] = edtCW6VCO_SCA5;
- m_edtCW6VCO_SCA[6] = edtCW6VCO_SCA6;
- // m_edtCW7LO_VSW_G[0] = edtCW7LO_VSW_G0;
- // m_edtCW7LO_VSW_G[1] = edtCW7LO_VSW_G1;
- // m_edtCW7LO_VSW_G[2] = edtCW7LO_VSW_G2;
- // m_edtCW7LO_VSW_D[0] = edtCW7LO_VSW_D0;
- // m_edtCW7LO_VSW_D[1] = edtCW7LO_VSW_D1;
- // m_edtCW7LO_VSW_D[2] = edtCW7LO_VSW_D2;
- m_edtCW7RX_GAIN[0] = edtCW7RX_GAIN0;
- m_edtCW7RX_GAIN[1] = edtCW7RX_GAIN1;
- m_edtCW7RX_GAIN[2] = edtCW7RX_GAIN2;
- m_edtCW7RX_GAIN[3] = edtCW7RX_GAIN3;
- m_edtCW7RX_GAIN[4] = edtCW7RX_GAIN4;
- m_edtCW7RX_GAIN[5] = edtCW7RX_GAIN5;
- m_edtCW7RX_GAIN[6] = edtCW7RX_GAIN6;
- m_edtCW7RX_GAIN[7] = edtCW7RX_GAIN7;
- m_edtCW8DC_DAC_BI[0] = edtCW8DC_DAC_BI0;
- m_edtCW8DC_DAC_BI[1] = edtCW8DC_DAC_BI1;
- m_edtCW8DC_DAC_BI[2] = edtCW8DC_DAC_BI2;
- m_edtCW8DC_DAC_BI[3] = edtCW8DC_DAC_BI3;
- m_edtCW8DC_DAC_BI[4] = edtCW8DC_DAC_BI4;
- m_edtCW8DC_DAC_BI[5] = edtCW8DC_DAC_BI5;
- m_edtCW8DC_DAC_BI[6] = edtCW8DC_DAC_BI6;
- m_edtCW8DC_DAC_CI[0] = edtCW8DC_DAC_CI0;
- m_edtCW8DC_DAC_CI[1] = edtCW8DC_DAC_CI1;
- m_edtCW8DC_DAC_CI[2] = edtCW8DC_DAC_CI2;
- m_edtCW8DC_DAC_CI[3] = edtCW8DC_DAC_CI3;
- m_edtCW8DC_DAC_CI[4] = edtCW8DC_DAC_CI4;
- m_edtCW8DC_DAC_CI[5] = edtCW8DC_DAC_CI5;
- m_edtCW8DC_DAC_CI[6] = edtCW8DC_DAC_CI6;
- m_edtCW9DC_DAC_BQ[0] = edtCW9DC_DAC_BQ0;
- m_edtCW9DC_DAC_BQ[1] = edtCW9DC_DAC_BQ1;
- m_edtCW9DC_DAC_BQ[2] = edtCW9DC_DAC_BQ2;
- m_edtCW9DC_DAC_BQ[3] = edtCW9DC_DAC_BQ3;
- m_edtCW9DC_DAC_BQ[4] = edtCW9DC_DAC_BQ4;
- m_edtCW9DC_DAC_BQ[5] = edtCW9DC_DAC_BQ5;
- m_edtCW9DC_DAC_BQ[6] = edtCW9DC_DAC_BQ6;
- m_edtCW9DC_DAC_CQ[0] = edtCW9DC_DAC_CQ0;
- m_edtCW9DC_DAC_CQ[1] = edtCW9DC_DAC_CQ1;
- m_edtCW9DC_DAC_CQ[2] = edtCW9DC_DAC_CQ2;
- m_edtCW9DC_DAC_CQ[3] = edtCW9DC_DAC_CQ3;
- m_edtCW9DC_DAC_CQ[4] = edtCW9DC_DAC_CQ4;
- m_edtCW9DC_DAC_CQ[5] = edtCW9DC_DAC_CQ5;
- m_edtCW9DC_DAC_CQ[6] = edtCW9DC_DAC_CQ6;
-
- m_edtCW10AM_DACI[0] = edtCW10AM_DACI0;
- m_edtCW10AM_DACI[1] = edtCW10AM_DACI1;
- m_edtCW10AM_DACI[2] = edtCW10AM_DACI2;
- m_edtCW10AM_DACI[3] = edtCW10AM_DACI3;
- m_edtCW10AM_DACI[4] = edtCW10AM_DACI4;
- m_edtCW10AM_DACI[5] = edtCW10AM_DACI5;
- m_edtCW10AM_DACI[6] = edtCW10AM_DACI6;
- // m_edtCW10AM_DACI[7] = edtCW10AM_DACI7;
- m_edtCW10AM_DACQ[0] = edtCW10AM_DACQ0;
- m_edtCW10AM_DACQ[1] = edtCW10AM_DACQ1;
- m_edtCW10AM_DACQ[2] = edtCW10AM_DACQ2;
- m_edtCW10AM_DACQ[3] = edtCW10AM_DACQ3;
- m_edtCW10AM_DACQ[4] = edtCW10AM_DACQ4;
- m_edtCW10AM_DACQ[5] = edtCW10AM_DACQ5;
- m_edtCW10AM_DACQ[6] = edtCW10AM_DACQ6;
- // m_edtCW10AM_DACQ[7] = edtCW10AM_DACQ7;
-
- m_edtCW11TXVAPC[0] = edtCW11TXVAPC0;
- m_edtCW11TXVAPC[1] = edtCW11TXVAPC1;
- m_edtCW11TXVAPC[2] = edtCW11TXVAPC2;
- // m_edtCW11TXITC[0] = edtCW11TXITC0;
- // m_edtCW11TXITC[1] = edtCW11TXITC1;
- // m_edtCW11TXITC[2] = edtCW11TXITC2;
- m_edtCW11TXIOS_TC[0] = edtCW11TXIOS_TC0;
- m_edtCW11TXIOS_TC[1] = edtCW11TXIOS_TC1;
- m_edtCW11TXIOS_TC[2] = edtCW11TXIOS_TC2;
- m_edtCW11TXQOS_VGAIC[0] = edtCW11TXQOS_VGAIC0;
- m_edtCW11TXQOS_VGAIC[1] = edtCW11TXQOS_VGAIC1;
- m_edtCW11TXQOS_VGAIC[2] = edtCW11TXQOS_VGAIC2;
- m_edtCW11DIVB_SEL[0] = edtCW11DIVB_SEL0;
- m_edtCW11DIVB_SEL[1] = edtCW11DIVB_SEL1;
- m_edtCW12TXVAPC[0] = edtCW12TXVAPC0;
- m_edtCW12TXVAPC[1] = edtCW12TXVAPC1;
- m_edtCW12TXVAPC[2] = edtCW12TXVAPC2;
- // m_edtCW11TXITC[0] = edtCW11TXITC0;
- // m_edtCW11TXITC[1] = edtCW11TXITC1;
- // m_edtCW11TXITC[2] = edtCW11TXITC2;
- m_edtCW12TXIOS_TC[0] = edtCW12TXIOS_TC0;
- m_edtCW12TXIOS_TC[1] = edtCW12TXIOS_TC1;
- m_edtCW12TXIOS_TC[2] = edtCW12TXIOS_TC2;
- m_edtCW12TXQOS_VGAIC[0] = edtCW12TXQOS_VGAIC0;
- m_edtCW12TXQOS_VGAIC[1] = edtCW12TXQOS_VGAIC1;
- m_edtCW12TXQOS_VGAIC[2] = edtCW12TXQOS_VGAIC2;
- m_edtCW12DIVB_SEL[0] = edtCW12DIVB_SEL0;
- m_edtCW12DIVB_SEL[1] = edtCW12DIVB_SEL1;
- m_edtCW15AUXOUT_SELETCION[0] = edtCW15AUXOUT_SELETCION0;
- m_edtCW15AUXOUT_SELETCION[1] = edtCW15AUXOUT_SELETCION1;
- m_edtCW15AUXOUT_SELETCION[2] = edtCW15AUXOUT_SELETCION2;
- m_edtCW15AUXOUT_SELETCION[3] = edtCW15AUXOUT_SELETCION3;
- m_edtCW15AUXOUT_SELETCION[4] = edtCW15AUXOUT_SELETCION4;
- m_edtCW15AUXOUT_SELETCION[5] = edtCW15AUXOUT_SELETCION5;
- m_edtCW15AUXOUT_SELETCION[6] = edtCW15AUXOUT_SELETCION6;
- m_edtCW15ADDRESS_DATA_OUT[0] = edtCW15ADDRESS_DATA_OUT0;
- m_edtCW15ADDRESS_DATA_OUT[1] = edtCW15ADDRESS_DATA_OUT1;
- m_edtCW15ADDRESS_DATA_OUT[2] = edtCW15ADDRESS_DATA_OUT2;
- m_edtCW15ADDRESS_DATA_OUT[3] = edtCW15ADDRESS_DATA_OUT3;
- }
- //===========================================================================
- ////////////////////////// Form event handler /////////////////////////////
- //---------------------------------------------------------------------------
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::FormCreate(TObject *Sender)
- {
- Init();
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::FormActivate(TObject *Sender)
- {
- if( m_bInit )
- {
- m_bInit = false;
- m_uiFinalRfid = frmMainSel->Get_FinalRFID();
- btnReadAllRegClick( NULL );
- }
- }
- //===========================================================================
- void TfrmMT6140CReg::Init( void )
- {
- m_bInit = true;
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::ShowHintLabel( TControl *sender, char* hint )
- {
- TPoint pt0 = this->ClientOrigin;
- TPoint pt1 = sender->ClientOrigin;
- lblHint->Left = (pt1.x-pt0.x);
- lblHint->Top = (pt1.y-pt0.y)+sender->Height+3;
- lblHint->Caption = hint;
- lblHint->Visible = true;
- HintTimer->Enabled = true;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TfrmMT6140CReg::ReDrawCW0Fields( void )
- {
- edtCW0POR->Text = IntToStr( m_sMT6140CCW0.uc_por );
- edtCW0GPO->Text = IntToStr( m_sMT6140CCW0.uc_gpo );
- edtCW0TXMOD_BPI->Text = IntToStr( m_sMT6140CCW0.uc_tx_mod_bpi );
- edtCW0VCOSEL->Text = IntToStr( m_sMT6140CCW0.uc_vcosel );
- for( int i=0; i<MT6140_CW0_AFC_LEN; i++ )
- {
- m_edtCW0AFC[i]->Text = IntToStr( ((m_sMT6140CCW0.uc_afc & (0x01<<i)) >> i) );
- }
- edtCW0FLT->Text = IntToStr( m_sMT6140CCW0.uc_flt );
- edtCW0DIEN->Text = IntToStr( m_sMT6140CCW0.uc_dien );
- edtCW0SYNPW->Text = IntToStr( m_sMT6140CCW0.uc_synpw );
- for( int i=0; i<MT6140_CW0_SYNCP_LEN; i++ )
- {
- m_edtCW0SYNCP[i]->Text = IntToStr( ((m_sMT6140CCW0.uc_syncp & (0x01<<i)) >> i) );
- }
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::ReDrawCW1Fields( void )
- {
- edtCW1TRX->Text = IntToStr( m_sMT6140CCW1.uc_trx );
- for( int i=0; i<MT6140_CW1_BAND_LEN; i++ )
- {
- m_edtCW1BAND[i]->Text = IntToStr( ((m_sMT6140CCW1.uc_band & (0x01<<i)) >> i) );
- }
- edtCW1BUF_MODE->Text = IntToStr( m_sMT6140CCW1.uc_bufmode );
- for( int i=0; i<MT6140_CW1_N_INTEGER_LEN; i++ )
- {
- m_edtCW1N_INTEGER[i]->Text = IntToStr( ((m_sMT6140CCW1.uc_n_integer & (0x01<<i)) >> i) );
- }
- for( int i=0; i<MT6140_CW1_N_FRACTION_LEN; i++ )
- {
- m_edtCW1N_FRACTION[i]->Text = IntToStr( ((m_sMT6140CCW1.uc_n_fraction & (0x01<<i)) >> i) );
- }
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::ReDrawCW2Fields( void )
- {
- for( int i=0; i<MT6140_CW2_DC_DAC_AI_LEN; i++ )
- {
- m_edtCW2DC_DAC_AI[i]->Text = IntToStr( ((m_sMT6140CCW2.uc_dc_dac_ai & (0x01<<i)) >> i) );
- }
- for( int i=0; i<MT6140_CW2_DC_DAC_AQ_LEN; i++ )
- {
- m_edtCW2DC_DAC_AQ[i]->Text = IntToStr( ((m_sMT6140CCW2.uc_dc_dac_aq & (0x01<<i)) >> i) );
- }
- edtCW2AUTO_CAL->Text = IntToStr( m_sMT6140CCW2.uc_auto_cal );
- for( int i=0; i<MT6140_CW2_MODE_LEN; i++ )
- {
- m_edtCW2MODE[i]->Text = IntToStr( ((m_sMT6140CCW2.uc_mode & (0x01<<i)) >> i) );
- }
- for( int i=0; i<MT6140_CW2_GAIN_TABLE_LEN; i++ )
- {
- m_edtCW2GAIN_TABLE[i]->Text = IntToStr( ((m_sMT6140CCW2.uc_gain_table & (0x01<<i)) >> i) );
- }
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::ReDrawCW3Fields( void )
- {
- edtCW3RFMIXP->Text = IntToStr( m_sMT6140CCW3.uc_rfmixp );
- edtCW3RFLNAP->Text = IntToStr( m_sMT6140CCW3.uc_rflnap );
- edtCW3SYNDIVP->Text = IntToStr( m_sMT6140CCW3.uc_syndivp );
- edtCW3SYNPFDP->Text = IntToStr( m_sMT6140CCW3.uc_synpfdp );
- edtCW3RXDIVP->Text = IntToStr( m_sMT6140CCW3.uc_rxdivp );
- edtCW3IFPGAP2->Text = IntToStr( m_sMT6140CCW3.uc_ifpgap2 );
- edtCW3IFPGAP1->Text = IntToStr( m_sMT6140CCW3.uc_ifpgap1 );
- edtCW3IFPOLP->Text = IntToStr( m_sMT6140CCW3.uc_ifpolp );
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::ReDrawCW4Fields( void )
- {
- edtCW4OTAEN->Text = IntToStr( m_sMT6140CCW4.uc_otaen );
- edtCW4FLDIS->Text = IntToStr( m_sMT6140CCW4.uc_fldis );
- for( int i=0; i<MT6140_CW4_CAL_DELAY_LEN; i++ )
- {
- m_edtCW4CAL_DELAY[i]->Text = IntToStr( ((m_sMT6140CCW4.uc_cal_delay & (0x01<<i)) >> i) );
- }
- for( int i=0; i<MT6140_CW4_VCO_VSET_LEN; i++ )
- {
- m_edtCW4VCO_VSET[i]->Text = IntToStr( ((m_sMT6140CCW4.uc_vco_vset & (0x01<<i)) >> i) );
- }
-
- edtCW4DREAD->Text = IntToStr( m_sMT6140CCW4.uc_dread );
- for( int i=0; i<MT6140_CW4_CAL_MODE_LEN; i++ )
- {
- m_edtCW4CALMODE[i]->Text = IntToStr( ((m_sMT6140CCW4.uc_calmode & (0x01<<i)) >> i) );
- }
- edtCW4LGAC->Text = IntToStr( m_sMT6140CCW4.uc_lgac );
- edtCW4C_FRA_IN->Text = IntToStr( m_sMT6140CCW4.uc_c_fra_in );
- edtCW4SXRSTDIV->Text = IntToStr( m_sMT6140CCW4.uc_sxrstdiv );
- edtCW4SYNTYP->Text = IntToStr( m_sMT6140CCW4.uc_syntyp );
- for( int i=0; i<MT6140_CW4_SYN_PFD_LEN; i++ )
- {
- m_edtCW4SYNPFD[i]->Text = IntToStr( ((m_sMT6140CCW4.uc_synpfd & (0x01<<i)) >> i) );
- }
- edtCW4SCA_CR_FI->Text = IntToStr( m_sMT6140CCW4.uc_sca_cr_fi );
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::ReDrawCW5Fields( void )
- {
- #if 0
- edtCW5RX_LNA_MID->Text = IntToStr( m_sMT6140CCW5.uc_rx_lna_mid );
- edtCW5RX_FT0->Text = IntToStr( m_sMT6140CCW5.uc_rx_ft0 );
- edtCW5RX_FT1->Text = IntToStr( m_sMT6140CCW5.uc_rx_ft1 );
- edtCW5RX_QT0->Text = IntToStr( m_sMT6140CCW5.uc_rx_qt0 );
- edtCW5RX_QT1->Text = IntToStr( m_sMT6140CCW5.uc_rx_qt1 );
- edtCW5RX_RESB->Text = IntToStr( m_sMT6140CCW5.uc_rx_resb );
- for( int i=0; i<MT6140_CW5_RESB_LEN; i++ )
- {
- m_edtCW5RESB[i]->Text = IntToStr( ((m_sMT6140CCW5.uc_resb & (0x01<<i)) >> i) );
- }
- for( int i=0; i<MT6140_CW5_RES_LEN; i++ )
- {
- m_edtCW5RES[i]->Text = IntToStr( ((m_sMT6140CCW5.uc_res & (0x01<<i)) >> i) );
- }
- #endif
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::ReDrawCW6Fields( void )
- {
- edtCW6T_CLK->Text = IntToStr( m_sMT6140CCW6.uc_t_clk );
- edtCW6T_LATCH->Text = IntToStr( m_sMT6140CCW6.uc_t_latch );
- edtCW6VCOBUFP->Text = IntToStr( m_sMT6140CCW6.uc_vco_bufp );
- edtCW6MONITOR->Text = IntToStr( m_sMT6140CCW6.uc_monitor );
- edtCW6SIO5->Text = IntToStr( m_sMT6140CCW6.uc_sio5 );
- for( int i=0; i<MT6140_CW6_VCO_SCA_LEN; i++ )
- {
- m_edtCW6VCO_SCA[i]->Text = IntToStr( ((m_sMT6140CCW6.uc_vco_sca & (0x01<<i)) >> i) );
- }
- edtCW6VCOSET->Text = IntToStr( m_sMT6140CCW6.uc_vcoset );
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::ReDrawCW7Fields( void )
- {
- #if 0
- for( int i=0; i<MT6140_CW7_LO_VSW_G_LEN; i++ )
- {
- m_edtCW7LO_VSW_G[i]->Text = IntToStr( ((m_sMT6140CCW7.uc_lo_vsw_g & (0x01<<i)) >> i) );
- }
- for( int i=0; i<MT6140_CW7_LO_VSW_D_LEN; i++ )
- {
- m_edtCW7LO_VSW_D[i]->Text = IntToStr( ((m_sMT6140CCW7.uc_lo_vsw_d & (0x01<<i)) >> i) );
- }
- edtCW7MAN_CAL->Text = IntToStr( m_sMT6140CCW7.uc_man_cal );
- edtCW7AUTO_GAIN_SEL->Text = IntToStr( m_sMT6140CCW7.uc_auto_gain_select );
- for( int i=0; i<MT6140_CW7_RX_GAIN_LEN; i++ )
- {
- m_edtCW7RX_GAIN[i]->Text = IntToStr( ((m_sMT6140CCW7.uc_rx_gain & (0x01<<i)) >> i) );
- }
- #endif
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::ReDrawCW8Fields( void )
- {
- edtCW8SW3->Text = IntToStr( m_sMT6140CCW8.uc_rx_ctrl_sw3 );
- edtCW8SW2->Text = IntToStr( m_sMT6140CCW8.uc_rx_ctrl_sw2 );
- edtCW8SW1->Text = IntToStr( m_sMT6140CCW8.uc_rx_ctrl_sw1 );
- edtCW8SWB->Text = IntToStr( m_sMT6140CCW8.uc_rx_ctrl_swb );
- edtCW8SWA->Text = IntToStr( m_sMT6140CCW8.uc_rx_ctrl_swa );
- edtCW8SWEN->Text = IntToStr( m_sMT6140CCW8.uc_rx_ctrl_swen );
- for( int i=0; i<MT6140_CW8_DC_DAC_BI_LEN; i++ )
- {
- m_edtCW8DC_DAC_BI[i]->Text = IntToStr( ((m_sMT6140CCW8.uc_dc_dac_bi & (0x01<<i)) >> i) );
- }
- for( int i=0; i<MT6140_CW8_DC_DAC_CI_LEN; i++ )
- {
- m_edtCW8DC_DAC_CI[i]->Text = IntToStr( ((m_sMT6140CCW8.uc_dc_dac_ci & (0x01<<i)) >> i) );
- }
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::ReDrawCW9Fields( void )
- {
- edtCW9PWR_DAC_A->Text = IntToStr( m_sMT6140CCW9.uc_pwr_dac_a );
- edtCW9PWR_DAC_B->Text = IntToStr( m_sMT6140CCW9.uc_pwr_dac_b );
- edtCW9PWR_DAC_C->Text = IntToStr( m_sMT6140CCW9.uc_pwr_dac_c );
- for( int i=0; i<MT6140_CW9_DC_DAC_BQ_LEN; i++ )
- {
- m_edtCW9DC_DAC_BQ[i]->Text = IntToStr( ((m_sMT6140CCW9.uc_dc_dac_bq & (0x01<<i)) >> i) );
- }
- for( int i=0; i<MT6140_CW9_DC_DAC_CQ_LEN; i++ )
- {
- m_edtCW9DC_DAC_CQ[i]->Text = IntToStr( ((m_sMT6140CCW9.uc_dc_dac_cq & (0x01<<i)) >> i) );
- }
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::ReDrawCW10Fields( void )
- {
- for( int i=0; i<MT6140_CW10_AM_DACI_LEN; i++ )
- {
- m_edtCW10AM_DACI[i]->Text = IntToStr( ((m_sMT6140CCW10.uc_am_daci & (0x01<<i)) >> i) );
- }
- for( int i=0; i<MT6140_CW10_AM_DACQ_LEN; i++ )
- {
- m_edtCW10AM_DACQ[i]->Text = IntToStr( ((m_sMT6140CCW10.uc_am_dacq & (0x01<<i)) >> i) );
- }
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::ReDrawCW11Fields( void )
- {
- #if 0
- edtCW11LBCAPON_EN->Text = IntToStr( m_sMT6140CCW11.uc_lbcapon_en );
- edtCW11LBCAPON->Text = IntToStr( m_sMT6140CCW11.uc_lbcapon );
- edtCW11TX_CI_1->Text = IntToStr( m_sMT6140CCW11.uc_tx_ci_1 );
- edtCW11TX_CI_0->Text = IntToStr( m_sMT6140CCW11.uc_tx_ci_0 );
- edtCW11TX_ICSC_PTAT->Text = IntToStr( m_sMT6140CCW11.uc_tx_icsc_ptat );
- edtCW11TX_VGA_PTAT->Text = IntToStr( m_sMT6140CCW11.uc_tx_vga_ptat );
- edtCW11TXDIV_GC1->Text = IntToStr( m_sMT6140CCW11.uc_txdiv_gc1 );
- edtCW11TXDIV_GC0->Text = IntToStr( m_sMT6140CCW11.uc_txdiv_gc0 );
- for( int i=0; i<MT6140_CW11_TXVAPC_LEN; i++ )
- {
- m_edtCW11TXVAPC[i]->Text = IntToStr( ((m_sMT6140CCW11.uc_txvapc & (0x01<<i)) >> i) );
- }
- for( int i=0; i<MT6140_CW11_TXITC_LEN; i++ )
- {
- m_edtCW11TXITC[i]->Text = IntToStr( ((m_sMT6140CCW11.uc_tx_itc & (0x01<<i)) >> i) );
- }
- edtCW11TXMODGC_EN->Text = IntToStr( m_sMT6140CCW11.uc_txmodgc_en );
- edtCW11TXMODGC->Text = IntToStr( m_sMT6140CCW11.uc_txmodgc );
- edtCW11TXDBUF->Text = IntToStr( m_sMT6140CCW11.uc_txdbuf );
- edtCW11TXGBUF->Text = IntToStr( m_sMT6140CCW11.uc_txgbuf );
- edtCW11TXDIV4->Text = IntToStr( m_sMT6140CCW11.uc_txdiv4 );
- edtCW11TXDIV2->Text = IntToStr( m_sMT6140CCW11.uc_txdiv2 );
- edtCW11TXDIQM->Text = IntToStr( m_sMT6140CCW11.uc_txdiqm );
- edtCW11TXGIQM->Text = IntToStr( m_sMT6140CCW11.uc_txgiqm );
- edtCW11TXCTL->Text = IntToStr( m_sMT6140CCW11.uc_txctl );
- #endif
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::ReDrawCW15Fields( void )
- {
- for( int i=0; i<MT6140_CW15_AUXOUT_SELECTION_LEN; i++ )
- {
- m_edtCW15AUXOUT_SELETCION[i]->Text = IntToStr( ((m_sMT6140CCW15.uc_auxout_selection & (0x01<<i)) >> i) );
- }
- for( int i=0; i<MT6140_CW15_ADDRESS_DATA_OUT_LEN; i++ )
- {
- m_edtCW15ADDRESS_DATA_OUT[i]->Text = IntToStr( ((m_sMT6140CCW15.uc_address_data_out & (0x01<<i)) >> i) );
- }
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void TfrmMT6140CReg::CurrentPageReset( void )
- {
- btnReadCW0FromReg->Enabled = true;
- btnWriteCW0ToReg->Enabled = true;
- btnReadCW1FromReg->Enabled = true;
- btnWriteCW1ToReg->Enabled = true;
- btnReadCW2FromReg->Enabled = true;
- btnWriteCW2ToReg->Enabled = true;
- btnReadCW3FromReg->Enabled = true;
- btnWriteCW3ToReg->Enabled = true;
- btnReadCW4FromReg->Enabled = true;
- btnWriteCW4ToReg->Enabled = true;
- btnReadCW5FromReg->Enabled = true;
- btnWriteCW5ToReg->Enabled = true;
- btnReadCW6FromReg->Enabled = true;
- btnWriteCW6ToReg->Enabled = true;
- btnReadCW7FromReg->Enabled = true;
- btnWriteCW7ToReg->Enabled = true;
- btnReadCW8FromReg->Enabled = true;
- btnWriteCW8ToReg->Enabled = true;
- btnReadCW9FromReg->Enabled = true;
- btnWriteCW9ToReg->Enabled = true;
- btnReadCW10FromReg->Enabled = true;
- btnWriteCW10ToReg->Enabled = true;
- btnReadCW11FromReg->Enabled = true;
- btnWriteCW11ToReg->Enabled = true;
- btnReadCW15FromReg->Enabled = true;
- btnWriteCW15ToReg->Enabled = true;
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CurrentPageLock( void )
- {
- btnReadCW0FromReg->Enabled = false;
- btnWriteCW0ToReg->Enabled = false;
- btnReadCW1FromReg->Enabled = false;
- btnWriteCW1ToReg->Enabled = false;
- btnReadCW2FromReg->Enabled = false;
- btnWriteCW2ToReg->Enabled = false;
- btnReadCW3FromReg->Enabled = false;
- btnWriteCW3ToReg->Enabled = false;
- btnReadCW4FromReg->Enabled = false;
- btnWriteCW4ToReg->Enabled = false;
- btnReadCW5FromReg->Enabled = false;
- btnWriteCW5ToReg->Enabled = false;
- btnReadCW6FromReg->Enabled = false;
- btnWriteCW6ToReg->Enabled = false;
- btnReadCW7FromReg->Enabled = false;
- btnWriteCW7ToReg->Enabled = false;
- btnReadCW8FromReg->Enabled = false;
- btnWriteCW8ToReg->Enabled = false;
- btnReadCW9FromReg->Enabled = false;
- btnWriteCW9ToReg->Enabled = false;
- btnReadCW10FromReg->Enabled = false;
- btnWriteCW10ToReg->Enabled = false;
- btnReadCW11FromReg->Enabled = false;
- btnWriteCW11ToReg->Enabled = false;
- btnReadCW15FromReg->Enabled = false;
- btnWriteCW15ToReg->Enabled = false;
- }
- //---------------------------------------------------------------------------
- bool __fastcall TfrmMT6140CReg::edtCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return false;
- }
- return true;
- }
- void __fastcall TfrmMT6140CReg::edtPORCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW0.uc_por = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW0GPOCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW0.uc_gpo = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW0TXMOD_BPICheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW0.uc_tx_mod_bpi = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW0VCOSELCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW0.uc_vcosel = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW0AFCCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW0.uc_afc = (m_sMT6140CCW0.uc_afc & (0x3F ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW0FLTCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW0.uc_flt = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW0DIENCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW0.uc_dien = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW0SYNPWCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW0.uc_synpw = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW0SYNCPCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW0.uc_syncp = (m_sMT6140CCW0.uc_syncp & (0x03 ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW1TRXCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW1.uc_trx = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW1BANDCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW1.uc_band = (m_sMT6140CCW1.uc_band & (0x03 ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW1BUF_MODECheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW1.uc_bufmode = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW1N_INTEGERCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW1.uc_n_integer = (m_sMT6140CCW1.uc_n_integer & (0x7F ^ 0x01<<edit->Tag) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW1N_FRACTIONCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW1.uc_n_fraction = (m_sMT6140CCW1.uc_n_fraction & (0xFF ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW2DC_DAC_AICheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW2.uc_dc_dac_ai = (m_sMT6140CCW2.uc_dc_dac_ai & (0x3F ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW2DC_DAC_AQCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW2.uc_dc_dac_aq = (m_sMT6140CCW2.uc_dc_dac_aq & (0x3F ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW2AUTO_CALCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW2.uc_auto_cal = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW2MODECheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW2.uc_mode = (m_sMT6140CCW2.uc_mode & (0x07 ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW2GAIN_TABLECheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW2.uc_gain_table = (m_sMT6140CCW2.uc_gain_table & (0x3F ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW3RFMIXPCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW3.uc_rfmixp = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW3RFLNAPCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW3.uc_rflnap = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW3SYNDIVPCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW3.uc_syndivp = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW3SYNPFDPCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW3.uc_synpfdp = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW3RXDIVPCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW3.uc_rxdivp = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW3IFPGAP2Check(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW3.uc_ifpgap2 = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW3IFPGAP1Check(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW3.uc_ifpgap1 = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW3IFPOLPCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW3.uc_ifpolp = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW4OTAENCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW4.uc_otaen = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW4FLDISCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW4.uc_fldis = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW4CAL_DELAYCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW4.uc_cal_delay = (m_sMT6140CCW4.uc_cal_delay & (0x03 ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW4VCO_VSETCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW4.uc_vco_vset = (m_sMT6140CCW4.uc_vco_vset & (0x03 ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW4DREADCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW4.uc_dread = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW4CALMODECheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW4.uc_calmode = (m_sMT6140CCW4.uc_calmode & (0x03 ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW4LGACCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW4.uc_lgac = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW4C_FRA_INCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW4.uc_c_fra_in = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW4SXRSTDIVCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW4.uc_sxrstdiv = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW4SYNTYPCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW4.uc_syntyp = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW4SYNPFDCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW4.uc_synpfd = (m_sMT6140CCW4.uc_synpfd & (0x03 ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW4SCA_CR_FICheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW4.uc_sca_cr_fi = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW5RX_LNA_MIDCheck(TObject *Sender)
- {
- #if 0
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW5.uc_rx_lna_mid = uc_data;
- #endif
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW5RX_FT0Check(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW5.uc_rx_ft0 = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW5RX_FT1Check(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW5.uc_rx_ft1 = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW5RESBCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW5.uc_resb = (m_sMT6140CCW5.uc_resb & (0x1F ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW5RESCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW5.uc_res = (m_sMT6140CCW5.uc_res & (0x1F ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW6T_CLKCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW6.uc_t_clk = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW6T_LATCHCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW6.uc_t_latch = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW6VCOBUFPCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW6.uc_vco_bufp = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW6MONITORCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW6.uc_monitor = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW6SIO5Check(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW6.uc_sio5 = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW6VCO_SCACheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW6.uc_vco_sca = (m_sMT6140CCW6.uc_vco_sca & (0x7F ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW6VCOSETCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW6.uc_vcoset = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW7MAN_CODECheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW7.uc_man_code = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW7AUTO_GAIN_SELCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW7.uc_auto_gain_select = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW7RX_GAINCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW7.uc_rx_gain = (m_sMT6140CCW7.uc_rx_gain & (0xFF ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW8SW3Check(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW8.uc_rx_ctrl_sw3 = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW8SW2Check(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW8.uc_rx_ctrl_sw2 = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW8SW1Check(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW8.uc_rx_ctrl_sw1 = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW8SWBCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW8.uc_rx_ctrl_swb = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW8SWACheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW8.uc_rx_ctrl_swa = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW8SWENCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW8.uc_rx_ctrl_swen = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW8DC_DAC_BICheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW8.uc_dc_dac_bi = (m_sMT6140CCW8.uc_dc_dac_bi & (0x7F ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW8DC_DAC_CICheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW8.uc_dc_dac_ci = (m_sMT6140CCW8.uc_dc_dac_ci & (0x7F ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW9PWR_DAC_ACheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW9.uc_pwr_dac_a = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW9PWR_DAC_BCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW9.uc_pwr_dac_b = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW9PWR_DAC_CCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW9.uc_pwr_dac_c = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW9DC_DAC_BQCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW9.uc_dc_dac_bq = (m_sMT6140CCW9.uc_dc_dac_bq & (0x7F ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW9DC_DAC_CQCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW9.uc_dc_dac_cq = (m_sMT6140CCW9.uc_dc_dac_cq & (0x7F ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW10AM_DACICheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW10.uc_am_daci = (m_sMT6140CCW10.uc_am_daci & (0x7F ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW10AM_DACQCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW10.uc_am_dacq = (m_sMT6140CCW10.uc_am_dacq & (0x7F ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW11TXDIV_GC0Check(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW11.uc_txdiv_gc0 = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW11TXVAPCCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW11.uc_txvapc = (m_sMT6140CCW11.uc_txvapc & (0x07 ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW11TXQOS_VGAICCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW11.uc_txqos_vgaic = (m_sMT6140CCW11.uc_txqos_vgaic & (0x07 ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW11TXDIV4_IL_GLCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW11.uc_txdiv4_il_gl = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW11TX_ITC3Check(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW11.uc_tx_itc3 = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW11TX_ITC2Check(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW11.uc_tx_itc2 = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW11TX_ITC1Check(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW11.uc_tx_itc1 = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW11TX_ITC0Check(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW11.uc_tx_itc0 = uc_data;
- }
- //---------------------------------------------------------------------------
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW11TXIOS_TCCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW11.uc_txios_tc = (m_sMT6140CCW11.uc_txios_tc & (0x07 ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW11HBMOD_GC1Check(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW11.uc_hbmod_gc1 = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW11HBMOD_GC0Check(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW11.uc_hbmod_gc0 = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW11LBMOD_GCOCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW11.uc_lbmod_gc0 = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW11APC_SELCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW11.uc_apc_sel = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW11TXDIV_GC1Check(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW11.uc_txdiv_gc1 = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW15AUXOUT_SELETCIONCheck(
- TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW15.uc_auxout_selection = (m_sMT6140CCW15.uc_auxout_selection & (0x7F ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW15ADDRESS_DATA_OUTCheck(
- TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW15.uc_address_data_out = (m_sMT6140CCW15.uc_address_data_out & (0x0F ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::btnReadCW0FromRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_GetMT6140CW0FromReg;
- m_cRF_MT6140CReg_Obj.Get_MT6140CW0FromReg_Start(m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW0 from register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_GetMT6140CW0FromReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- m_sMT6140CCW0 = m_cRF_MT6140CReg_Obj.Get_MT6140CW0();
- ReDrawCW0Fields();
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW0 from register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW0 from register fail";
- Application->MessageBox( "Execution Failure : Get MT6140 CW0 from register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW0 from register timeout";
- Application->MessageBox( "Execution Timeout : Get MT6140 CW0 from register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW0 from register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnWriteCW0ToRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_SetMT6140CW0ToReg;
- m_cRF_MT6140CReg_Obj.Set_MT6140CW0ToReg_Start( m_sMT6140CCW0, m_uiFinalRfid );
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW0 to register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_SetMT6140CW0ToReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW0 to register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW0 to register fail";
- Application->MessageBox( "Execution Failure : Set MT6140 CW0 to register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW0 to register timeout";
- Application->MessageBox( "Execution Timeout : Set MT6140 CW0 to register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW0 to register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnReadCW1FromRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_GetMT6140CW1FromReg;
- m_cRF_MT6140CReg_Obj.Get_MT6140CW1FromReg_Start( m_uiFinalRfid );
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW1 from register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_GetMT6140CW1FromReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- m_sMT6140CCW1 = m_cRF_MT6140CReg_Obj.Get_MT6140CW1();
- ReDrawCW1Fields();
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW1 from register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW1 from register fail";
- Application->MessageBox( "Execution Failure : Get MT6140 CW1 from register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW1 from register timeout";
- Application->MessageBox( "Execution Timeout : Get MT6140 CW1 from register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW1 from register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnWriteCW1ToRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_SetMT6140CW1ToReg;
- m_cRF_MT6140CReg_Obj.Set_MT6140CW1ToReg_Start(m_sMT6140CCW1, m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW1 to register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_SetMT6140CW1ToReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW1 to register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW1 to register fail";
- Application->MessageBox( "Execution Failure : Set MT6140 CW1 to register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW1 to register timeout";
- Application->MessageBox( "Execution Timeout : Set MT6140 CW1 to register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW1 to register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnReadCW2FromRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_GetMT6140CW2FromReg;
- m_cRF_MT6140CReg_Obj.Get_MT6140CW2FromReg_Start(m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW2 from register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_GetMT6140CW2FromReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- m_sMT6140CCW2 = m_cRF_MT6140CReg_Obj.Get_MT6140CW2();
- ReDrawCW2Fields();
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW2 from register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW2 from register fail";
- Application->MessageBox( "Execution Failure : Get MT6140 CW2 from register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW2 from register timeout";
- Application->MessageBox( "Execution Timeout : Get MT6140 CW2 from register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW2 from register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnWriteCW2ToRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_SetMT6140CW2ToReg;
- m_cRF_MT6140CReg_Obj.Set_MT6140CW2ToReg_Start(m_sMT6140CCW2, m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW2 to register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_SetMT6140CW2ToReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW2 to register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW2 to register fail";
- Application->MessageBox( "Execution Failure : Set MT6140 CW2 to register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW2 to register timeout";
- Application->MessageBox( "Execution Timeout : Set MT6140 CW2 to register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW2 to register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnReadCW3FromRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_GetMT6140CW3FromReg;
- m_cRF_MT6140CReg_Obj.Get_MT6140CCW3FromReg_Start(m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW3 from register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_GetMT6140CW3FromReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- m_sMT6140CCW3 = m_cRF_MT6140CReg_Obj.Get_MT6140CCW3();
- ReDrawCW3Fields();
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW3 from register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW3 from register fail";
- Application->MessageBox( "Execution Failure : Get MT6140 CW3 from register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW3 from register timeout";
- Application->MessageBox( "Execution Timeout : Get MT6140 CW3 from register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW3 from register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnWriteCW3ToRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_SetMT6140CW3ToReg;
- m_cRF_MT6140CReg_Obj.Set_MT6140CCW3ToReg_Start(m_sMT6140CCW3, m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW3 to register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_SetMT6140CW3ToReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW3 to register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW3 to register fail";
- Application->MessageBox( "Execution Failure : Set MT6140 CW3 to register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW3 to register timeout";
- Application->MessageBox( "Execution Timeout : Set MT6140 CW3 to register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW3 to register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnReadCW4FromRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_GetMT6140CW4FromReg;
- m_cRF_MT6140CReg_Obj.Get_MT6140CCW4FromReg_Start(m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW4 from register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_GetMT6140CW4FromReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- m_sMT6140CCW4 = m_cRF_MT6140CReg_Obj.Get_MT6140CCW4();
- ReDrawCW4Fields();
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW4 from register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW4 from register fail";
- Application->MessageBox( "Execution Failure : Get MT6140 CW4 from register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW4 from register timeout";
- Application->MessageBox( "Execution Timeout : Get MT6140 CW4 from register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW4 from register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnWriteCW4ToRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_SetMT6140CW4ToReg;
- m_cRF_MT6140CReg_Obj.Set_MT6140CCW4ToReg_Start(m_sMT6140CCW4, m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW4 to register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_SetMT6140CW4ToReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW4 to register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW4 to register fail";
- Application->MessageBox( "Execution Failure : Set MT6140 CW0 to register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW4 to register timeout";
- Application->MessageBox( "Execution Timeout : Set MT6140 CW0 to register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW4 to register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnReadCW5FromRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_GetMT6140CW5FromReg;
- m_cRF_MT6140CReg_Obj.Get_MT6140CCW5FromReg_Start(m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW5 from register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_GetMT6140CW5FromReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- m_sMT6140CCW5 = m_cRF_MT6140CReg_Obj.Get_MT6140CCW5();
- ReDrawCW5Fields();
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW5 from register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW5 from register fail";
- Application->MessageBox( "Execution Failure : Get MT6140 CW5 from register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW5 from register timeout";
- Application->MessageBox( "Execution Timeout : Get MT6140 CW5 from register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW5 from register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnWriteCW5ToRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_SetMT6140CW5ToReg;
- m_cRF_MT6140CReg_Obj.Set_MT6140CCW5ToReg_Start(m_sMT6140CCW5, m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW5 to register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_SetMT6140CW5ToReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW5 to register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW5 to register fail";
- Application->MessageBox( "Execution Failure : Set MT6140 CW05 to register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW5 to register timeout";
- Application->MessageBox( "Execution Timeout : Set MT6140 CW5 to register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW5 to register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnReadCW6FromRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_GetMT6140CW6FromReg;
- m_cRF_MT6140CReg_Obj.Get_MT6140CW6FromReg_Start(m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW6 from register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_GetMT6140CW6FromReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- m_sMT6140CCW6 = m_cRF_MT6140CReg_Obj.Get_MT6140CW6();
- ReDrawCW6Fields();
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW6 from register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW6 from register fail";
- Application->MessageBox( "Execution Failure : Get MT6140 CW6 from register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW6 from register timeout";
- Application->MessageBox( "Execution Timeout : Get MT6140 CW6 from register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW6 from register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnWriteCW6ToRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_SetMT6140CW6ToReg;
- m_cRF_MT6140CReg_Obj.Set_MT6140CW6ToReg_Start(m_sMT6140CCW6, m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW6 to register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_SetMT6140CW6ToReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW6 to register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW6 to register fail";
- Application->MessageBox( "Execution Failure : Set MT6140 CW6 to register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW6 to register timeout";
- Application->MessageBox( "Execution Timeout : Set MT6140 CW6 to register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW6 to register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnReadCW7FromRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_GetMT6140CW7FromReg;
- m_cRF_MT6140CReg_Obj.Get_MT6140CCW7FromReg_Start(m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW7 from register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_GetMT6140CW7FromReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- m_sMT6140CCW7 = m_cRF_MT6140CReg_Obj.Get_MT6140CCW7();
- ReDrawCW7Fields();
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW7 from register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW7 from register fail";
- Application->MessageBox( "Execution Failure : Get MT6140 CW7 from register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW7 from register timeout";
- Application->MessageBox( "Execution Timeout : Get MT6140 CW7 from register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW7 from register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnWriteCW7ToRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_SetMT6140CW7ToReg;
- m_cRF_MT6140CReg_Obj.Set_MT6140CCW7ToReg_Start(m_sMT6140CCW7, m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW7 to register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_SetMT6140CW7ToReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW7 to register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW7 to register fail";
- Application->MessageBox( "Execution Failure : Set MT6140 CW7 to register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW7 to register timeout";
- Application->MessageBox( "Execution Timeout : Set MT6140 CW7 to register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW7 to register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnReadCW8FromRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_GetMT6140CW8FromReg;
- m_cRF_MT6140CReg_Obj.Get_MT6140CW8FromReg_Start(m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW8 from register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_GetMT6140CW8FromReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- m_sMT6140CCW8 = m_cRF_MT6140CReg_Obj.Get_MT6140CW8();
- ReDrawCW8Fields();
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW8 from register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW8 from register fail";
- Application->MessageBox( "Execution Failure : Get MT6140 CW8 from register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW8 from register timeout";
- Application->MessageBox( "Execution Timeout : Get MT6140 CW8 from register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW8 from register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnWriteCW8ToRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_SetMT6140CW8ToReg;
- m_cRF_MT6140CReg_Obj.Set_MT6140CW8ToReg_Start(m_sMT6140CCW8, m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW8 to register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_SetMT6140CW8ToReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW8 to register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW8 to register fail";
- Application->MessageBox( "Execution Failure : Set MT6140 CW8 to register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW8 to register timeout";
- Application->MessageBox( "Execution Timeout : Set MT6140 CW8 to register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW8 to register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnReadCW9FromRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_GetMT6140CW9FromReg;
- m_cRF_MT6140CReg_Obj.Get_MT6140CCW9FromReg_Start(m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW9 from register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_GetMT6140CW9FromReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- m_sMT6140CCW9 = m_cRF_MT6140CReg_Obj.Get_MT6140CCW9();
- ReDrawCW9Fields();
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW9 from register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW9 from register fail";
- Application->MessageBox( "Execution Failure : Get MT6140 CW9 from register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW9 from register timeout";
- Application->MessageBox( "Execution Timeout : Get MT6140 CW9 from register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW9 from register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnWriteCW9ToRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_SetMT6140CW9ToReg;
- m_cRF_MT6140CReg_Obj.Set_MT6140CCW9ToReg_Start(m_sMT6140CCW9, m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW9 to register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_SetMT6140CW9ToReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW9 to register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW9 to register fail";
- Application->MessageBox( "Execution Failure : Set MT6140 CW9 to register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW9 to register timeout";
- Application->MessageBox( "Execution Timeout : Set MT6140 CW9 to register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW9 to register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnReadCW10FromRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_GetMT6140CW10FromReg;
- m_cRF_MT6140CReg_Obj.Get_MT6140CW10FromReg_Start(m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW10 from register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_GetMT6140CW10FromReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- m_sMT6140CCW10 = m_cRF_MT6140CReg_Obj.Get_MT6140CW10();
- ReDrawCW10Fields();
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW10 from register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW10 from register fail";
- Application->MessageBox( "Execution Failure : Get MT6140 CW10 from register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW10 from register timeout";
- Application->MessageBox( "Execution Timeout : Get MT6140 CW10 from register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW10 from register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnWriteCW10ToRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_SetMT6140CW10ToReg;
- m_cRF_MT6140CReg_Obj.Set_MT6140CW10ToReg_Start(m_sMT6140CCW10, m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW10 to register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_SetMT6140CW10ToReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW10 to register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW10 to register fail";
- Application->MessageBox( "Execution Failure : Set MT6140 CW10 to register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW10 to register timeout";
- Application->MessageBox( "Execution Timeout : Set MT6140 CW10 to register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW10 to register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnReadCW11FromRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_GetMT6140CW11FromReg;
- m_cRF_MT6140CReg_Obj.Get_MT6140CCW11FromReg_Start(m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW11 from register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_GetMT6140CW11FromReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- m_sMT6140CCW11 = m_cRF_MT6140CReg_Obj.Get_MT6140CCW11();
- ReDrawCW11Fields();
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW11 from register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW11 from register fail";
- Application->MessageBox( "Execution Failure : Get MT6140 CW11 from register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW11 from register timeout";
- Application->MessageBox( "Execution Timeout : Get MT6140 CW11 from register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW11 from register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnWriteCW11ToRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_SetMT6140CW11ToReg;
- m_cRF_MT6140CReg_Obj.Set_MT6140CCW11ToReg_Start(m_sMT6140CCW11, m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW11 to register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_SetMT6140CW11ToReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW11 to register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW11 to register fail";
- Application->MessageBox( "Execution Failure : Set MT6140 CW11 to register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW11 to register timeout";
- Application->MessageBox( "Execution Timeout : Set MT6140 CW11 to register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW11 to register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnReadCW15FromRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_GetMT6140CW15FromReg;
- m_cRF_MT6140CReg_Obj.Get_MT6140CW15FromReg_Start(m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW12 from register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_GetMT6140CW15FromReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- m_sMT6140CCW15 = m_cRF_MT6140CReg_Obj.Get_MT6140CW15();
- ReDrawCW15Fields();
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW15 from register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW15 from register fail";
- Application->MessageBox( "Execution Failure : Get MT6140 CW15 from register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW15 from register timeout";
- Application->MessageBox( "Execution Timeout : Get MT6140 CW15 from register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get MT6140 CW15 from register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnWriteCW15ToRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_SetMT6140CW15ToReg;
- m_cRF_MT6140CReg_Obj.Set_MT6140CW15ToReg_Start(m_sMT6140CCW15, m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW12 to register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_SetMT6140CW15ToReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW15 to register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW15 to register fail";
- Application->MessageBox( "Execution Failure : Set MT6140 CW15 to register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW15 to register timeout";
- Application->MessageBox( "Execution Timeout : Set MT6140 CW15 to register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set MT6140 CW15 to register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void __fastcall TfrmMT6140CReg::btnReadAllRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_GetMT6140AllFromReg;
- m_cRF_MT6140CReg_Obj.Get_MT6140AllFromReg_Start(m_uiFinalRfid);
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get All MT6140 control words from register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_GetMT6140AllFromReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- m_sMT6140CCW0 = m_cRF_MT6140CReg_Obj.Get_MT6140CW0();
- m_sMT6140CCW1 = m_cRF_MT6140CReg_Obj.Get_MT6140CW1();
- m_sMT6140CCW2 = m_cRF_MT6140CReg_Obj.Get_MT6140CW2();
- m_sMT6140CCW3 = m_cRF_MT6140CReg_Obj.Get_MT6140CCW3();
- m_sMT6140CCW4 = m_cRF_MT6140CReg_Obj.Get_MT6140CCW4();
- m_sMT6140CCW5 = m_cRF_MT6140CReg_Obj.Get_MT6140CCW5();
- m_sMT6140CCW6 = m_cRF_MT6140CReg_Obj.Get_MT6140CW6();
- m_sMT6140CCW7 = m_cRF_MT6140CReg_Obj.Get_MT6140CCW7();
- m_sMT6140CCW8 = m_cRF_MT6140CReg_Obj.Get_MT6140CW8();
- m_sMT6140CCW9 = m_cRF_MT6140CReg_Obj.Get_MT6140CCW9();
- m_sMT6140CCW10 = m_cRF_MT6140CReg_Obj.Get_MT6140CW10();
- m_sMT6140CCW11 = m_cRF_MT6140CReg_Obj.Get_MT6140CCW11();
- m_sMT6140CCW15 = m_cRF_MT6140CReg_Obj.Get_MT6140CW15();
- ReDrawCW0Fields();
- ReDrawCW1Fields();
- ReDrawCW2Fields();
- ReDrawCW3Fields();
- ReDrawCW4Fields();
- ReDrawCW5Fields();
- ReDrawCW6Fields();
- ReDrawCW7Fields();
- ReDrawCW8Fields();
- ReDrawCW9Fields();
- ReDrawCW10Fields();
- ReDrawCW11Fields();
- ReDrawCW15Fields();
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get All MT6140 control words from register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get All MT6140 control words from register fail";
- Application->MessageBox( "Execution Failure : Get All MT6140 control words from register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get All MT6140 control words from register timeout";
- Application->MessageBox( "Execution Timeout : Get All MT6140 control words from register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Get All MT6140 control words from register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::btnWriteAllRegClick(TObject *Sender)
- {
- CurrentPageLock();
- m_cRF_MT6140CReg_Obj.Set_MT6140CW0( m_sMT6140CCW0 );
- m_cRF_MT6140CReg_Obj.Set_MT6140CW1( m_sMT6140CCW1 );
- m_cRF_MT6140CReg_Obj.Set_MT6140CW2( m_sMT6140CCW2 );
- m_cRF_MT6140CReg_Obj.Set_MT6140CCW3( m_sMT6140CCW3 );
- m_cRF_MT6140CReg_Obj.Set_MT6140CCW4( m_sMT6140CCW4 );
- m_cRF_MT6140CReg_Obj.Set_MT6140CCW5( m_sMT6140CCW5 );
- m_cRF_MT6140CReg_Obj.Set_MT6140CW6( m_sMT6140CCW6 );
- m_cRF_MT6140CReg_Obj.Set_MT6140CCW7( m_sMT6140CCW7 );
- m_cRF_MT6140CReg_Obj.Set_MT6140CW8( m_sMT6140CCW8 );
- m_cRF_MT6140CReg_Obj.Set_MT6140CCW9( m_sMT6140CCW9 );
- m_cRF_MT6140CReg_Obj.Set_MT6140CW10( m_sMT6140CCW10 );
- m_cRF_MT6140CReg_Obj.Set_MT6140CCW11( m_sMT6140CCW11 );
- m_cRF_MT6140CReg_Obj.Set_MT6140CW15( m_sMT6140CCW15 );
- m_cRF_MT6140CReg_Obj.ConfirmCallback = ::CNF_SetMT6140AllToReg;
- m_cRF_MT6140CReg_Obj.Set_MT6140AllToReg_Start( m_uiFinalRfid );
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set All MT6140 control words to register progressing";
- }
- //---------------------------------------------------------------------------
- void TfrmMT6140CReg::CNF_SetMT6140AllToReg( void )
- {
- E_METAAPP_RESULT_T state = m_cRF_MT6140CReg_Obj.Get_ConfirmState();
- switch( state )
- {
- case METAAPP_SUCCESS:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set All MT6140 control words to register successfully";
- }
- break;
- case METAAPP_FAIL:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set All MT6140 control words to register fail";
- Application->MessageBox( "Execution Failure : Set All MT6140 control words to register", "FAILURE", MB_OK );
- }
- break;
- case METAAPP_TIMEOUT:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set All MT6140 control words to register timeout";
- Application->MessageBox( "Execution Timeout : Set All MT6140 control words to register", "TIMEOUT", MB_OK );
- }
- break;
- case METAAPP_STOP:
- {
- sbMT6140Reg->Panels->Items[0]->Text = (AnsiString) " Set All MT6140 control words to register stop";
- }
- break;
- }
- CurrentPageReset();
- }
- void __fastcall TfrmMT6140CReg::HintTimerTimer(TObject *Sender)
- {
- HintTimer->Enabled = false;
- lblHint->Visible = false;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW4BGON_DELAYCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW4.uc_bgon_delay = (m_sMT6140CCW4.uc_bgon_delay & (0x03 ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW4SXICP_SWCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW4.uc_sxicp_sw = (m_sMT6140CCW4.uc_sxicp_sw & (0x03 ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtENABLE_AMCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW9.uc_enable_am = uc_data;
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmMT6140CReg::edtCW11DIVB_SELCheck(TObject *Sender)
- {
- unsigned char uc_data;
- AnsiString text;
- TEdit *edit = (TEdit*)Sender;
- char hint[] = " value shall be 0 or 1 ";
- text = edit->Text;
- if( !IsValidRegBit( text, uc_data ) )
- {
- ShowHintLabel( edit, hint );
- edit->Text = IntToStr( 0 );
- edit->SetFocus();
- return;
- }
- m_sMT6140CCW11.uc_divb_sel = (m_sMT6140CCW11.uc_divb_sel & (0x03 ^ (0x01<<edit->Tag)) ) | uc_data<<edit->Tag;
- }
- //---------------------------------------------------------------------------