• R/O
  • SSH
  • HTTPS

cc1101driver: Commit


Commit MetaInfo

Revision2609 (tree)
Time2014-10-29 11:15:40
Authorblackzoro

Log Message

(empty log message)

Change Summary

Incremental Difference

--- trunk/WireCmd/Debug/DevSet.ini (nonexistent)
+++ trunk/WireCmd/Debug/DevSet.ini (revision 2609)
@@ -0,0 +1,7 @@
1+[Com]
2+Port=COM9
3+BaudRate=9600
4+StopBits=1
5+DataBits=8
6+Parity=None
7+FlowControl=None
--- trunk/WireCmd/uSetup.cpp (nonexistent)
+++ trunk/WireCmd/uSetup.cpp (revision 2609)
@@ -0,0 +1,53 @@
1+//---------------------------------------------------------------------------
2+
3+#include <vcl.h>
4+#pragma hdrstop
5+
6+#include "uSetup.h"
7+//---------------------------------------------------------------------------
8+#pragma package(smart_init)
9+#pragma link "AdvGrid"
10+#pragma link "BaseGrid"
11+#pragma resource "*.dfm"
12+TfrmSetup *frmSetup;
13+//---------------------------------------------------------------------------
14+
15+
16+
17+__fastcall TfrmSetup::TfrmSetup(TComponent* Owner)
18+ : TForm(Owner)
19+{
20+}
21+//---------------------------------------------------------------------------
22+void __fastcall TfrmSetup::FormCreate(TObject *Sender)
23+{
24+ UnicodeString Id,Serial;
25+ AdvStringGrid1->MergeCells(0,0 ,3,1);
26+ for(int i=0 ; i < 20 ; i++)
27+ {
28+ Id.sprintf(L"ID=%02d 鑷秡=24秡圃\n\rSerial = 11111%02d\n\r S1=EMG,S2=S/R",i,i);
29+ AdvStringGrid1->MergeCells(0,i * 2 + 1,3,2);
30+ AdvStringGrid1->Cells[0][i * 2 + 1]= Id;
31+ }
32+
33+}
34+//---------------------------------------------------------------------------
35+void __fastcall TfrmSetup::AdvStringGrid1ClickCell(TObject *Sender, int ARow, int ACol)
36+
37+{
38+//
39+}
40+//---------------------------------------------------------------------------
41+void __fastcall TfrmSetup::AdvStringGrid1DblClickCell(TObject *Sender, int ARow, int ACol)
42+
43+{
44+ if(ACol < 3)
45+ {
46+ UnicodeString tmp;
47+
48+ tmp.sprintf(L"id %d->%d",(ARow-1)/2,ACol);
49+ ShowMessage(tmp);
50+
51+ }
52+}
53+//---------------------------------------------------------------------------
--- trunk/WireCmd/WireCmd.cpp (nonexistent)
+++ trunk/WireCmd/WireCmd.cpp (revision 2609)
@@ -0,0 +1,36 @@
1+//---------------------------------------------------------------------------
2+
3+#include <vcl.h>
4+#pragma hdrstop
5+#include <tchar.h>
6+//---------------------------------------------------------------------------
7+USEFORM("Wireless.cpp", frmMain);
8+USEFORM("uSetup.cpp", frmSetup);
9+//---------------------------------------------------------------------------
10+WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
11+{
12+ try
13+ {
14+ Application->Initialize();
15+ Application->MainFormOnTaskBar = true;
16+ Application->CreateForm(__classid(TfrmMain), &frmMain);
17+ Application->Run();
18+ }
19+ catch (Exception &exception)
20+ {
21+ Application->ShowException(&exception);
22+ }
23+ catch (...)
24+ {
25+ try
26+ {
27+ throw Exception("");
28+ }
29+ catch (Exception &exception)
30+ {
31+ Application->ShowException(&exception);
32+ }
33+ }
34+ return 0;
35+}
36+//---------------------------------------------------------------------------
--- trunk/WireCmd/uSetup.h (nonexistent)
+++ trunk/WireCmd/uSetup.h (revision 2609)
@@ -0,0 +1,29 @@
1+//---------------------------------------------------------------------------
2+
3+#ifndef uSetupH
4+#define uSetupH
5+//---------------------------------------------------------------------------
6+#include <Classes.hpp>
7+#include <Controls.hpp>
8+#include <StdCtrls.hpp>
9+#include <Forms.hpp>
10+#include <Grids.hpp>
11+#include "AdvGrid.hpp"
12+#include "BaseGrid.hpp"
13+//---------------------------------------------------------------------------
14+class TfrmSetup : public TForm
15+{
16+__published: // IDE-managed Components
17+ TAdvStringGrid *AdvStringGrid1;
18+ void __fastcall FormCreate(TObject *Sender);
19+ void __fastcall AdvStringGrid1ClickCell(TObject *Sender, int ARow, int ACol);
20+ void __fastcall AdvStringGrid1DblClickCell(TObject *Sender, int ARow, int ACol);
21+
22+private: // User declarations
23+public: // User declarations
24+ __fastcall TfrmSetup(TComponent* Owner);
25+};
26+//---------------------------------------------------------------------------
27+extern PACKAGE TfrmSetup *frmSetup;
28+//---------------------------------------------------------------------------
29+#endif
--- trunk/WireCmd/Wireless.cpp (nonexistent)
+++ trunk/WireCmd/Wireless.cpp (revision 2609)
@@ -0,0 +1,393 @@
1+//---------------------------------------------------------------------------
2+
3+#include <vcl.h>
4+#include <string.h>
5+#include <stdio.h>
6+#pragma hdrstop
7+
8+#include "Wireless.h"
9+#include "uSetup.h"
10+//---------------------------------------------------------------------------
11+#pragma package(smart_init)
12+#pragma link "CPortCtl"
13+#pragma link "CPort"
14+#pragma link "VirtualTrees"
15+#pragma link "AdvSplitter"
16+#pragma resource "*.dfm"
17+TfrmMain *frmMain;
18+
19+
20+
21+
22+//---------------------------------------------------------------------------
23+__fastcall TfrmMain::TfrmMain(TComponent* Owner)
24+ : TForm(Owner)
25+{
26+ m_temp = 0;
27+}
28+//---------------------------------------------------------------------------
29+
30+void __fastcall TfrmMain::FormCreate(TObject *Sender)
31+{
32+ String sExePath = ExtractFilePath(Application->ExeName ) ;
33+ Com->LoadSettings(stIniFile, sExePath + "\\DevSet.ini");
34+
35+ hReadEvent = CreateEvent( NULL, FALSE, FALSE,NULL );
36+ //edtCmd->SetFocus();
37+
38+ vtGrid->NodeDataSize = sizeof(fifo_t);
39+}
40+//---------------------------------------------------------------------------
41+bool TfrmMain::WriteCmd(AnsiString cmd)
42+{
43+ bCmdMode = true;
44+ Com->WriteStr(cmd);
45+ Timer1->Enabled = true;
46+ return false;
47+}
48+
49+
50+char asc_to_hex(u8 asc)
51+{
52+ if((asc >= '0') && (asc <= '9')) return (asc - '0');
53+ else if((asc >= 'A') && (asc <= 'F')) return (asc - 'A' + 0x0a);
54+ else if((asc >= 'a') && (asc <= 'f')) return (asc - 'a' + 0x0a);
55+ else return 0xff;
56+}
57+
58+u8 AscToHex(char * val)
59+{
60+ u8 tmp;
61+
62+ tmp = asc_to_hex(val[0]) << 4 | asc_to_hex(val[1]);
63+
64+ return tmp;
65+}
66+
67+BYTE gWCmd[7][60];
68+
69+BYTE data[1024];
70+int index = 0;
71+void __fastcall TfrmMain::ComRxChar(TObject *Sender, int Count)
72+{
73+ int i;
74+ Com->Read(&data[index],Count);
75+
76+ index += Count;
77+
78+ if(data[index - 1] == 0x0d || data[index - 1] == 0x00)
79+ {
80+ data[index-1] = 0x00;
81+ if(bCmdMode == true)
82+ {
83+ data[index-1] = 0;
84+ //memInfo->Lines->Add(strRes);
85+ Timer1->Enabled = false;
86+ bCmdMode = false;
87+ }
88+ else
89+ {
90+ BYTE * pC;
91+ int cmd_kind;
92+
93+ memset(gWCmd,0,sizeof(gWCmd));
94+
95+ pC = strtok(data," ");
96+
97+ i=0;
98+ while(pC != NULL)
99+ {
100+ strcpy(&gWCmd[i][0],pC);
101+ pC = strtok(NULL," ");
102+ i++;
103+ }
104+
105+ cmd_kind = i;
106+
107+ if(strstr((char *)&gWCmd[0][0],"wr") != NULL)
108+ {
109+ if(strstr((char *)&gWCmd[1][0],"dump") != NULL)
110+ {
111+ BYTE * pD;
112+ int len;
113+
114+ pD = (BYTE *)&m_rFifo;
115+
116+ memset(pD,0,sizeof(fifo_t));
117+
118+ len = strlen(gWCmd[2]);
119+
120+ for(i = 0 ; i < len; i+=2)
121+ {
122+ pD[i/2] = AscToHex(&gWCmd[2][i]);
123+ }
124+
125+ DumpDataGrid(pD,len/2);
126+ }
127+ else if(strstr((char *)&gWCmd[1][0],"ok") != NULL)
128+ {
129+ ShowMessage(L"Write OK");
130+ }
131+ }
132+ }
133+ index =0;
134+ }
135+}
136+
137+
138+void TfrmMain::DumpDataGrid(BYTE * data,int len)
139+{
140+ PVirtualNode Node;
141+ fifo_t * pFino;
142+
143+
144+ Node = vtGrid->AddChild(NULL);
145+ pFino = (fifo_t *)vtGrid->GetNodeData(Node);
146+ if(pFino != NULL)
147+ memcpy(pFino,data,len);
148+
149+}
150+//---------------------------------------------------------------------------
151+
152+void __fastcall TfrmMain::Timer1Timer(TObject *Sender)
153+{
154+ //memInfo->Lines->Add(L"R>> Not Response");
155+ Timer1->Enabled = false;
156+ bCmdMode = false;
157+}
158+//---------------------------------------------------------------------------
159+
160+
161+void __fastcall TfrmMain::btnSetupClick(TObject *Sender)
162+{
163+ String sExePath = ExtractFilePath(Application->ExeName ) ;
164+ Com->Connected = false;
165+ Com->ShowSetupDialog();
166+ Com->StoreSettings(stIniFile, sExePath + "\\DevSet.ini");
167+}
168+//---------------------------------------------------------------------------
169+
170+
171+void __fastcall TfrmMain::cheSetupClick(TObject *Sender)
172+{
173+ AnsiString cmd;
174+
175+ if(cheSetup->Checked == true)
176+ cmd = "setenv enable\r";
177+ else
178+ cmd = "setenv disable\r";
179+
180+ try
181+ {
182+ if(cheSetup->Checked == true)
183+ Com->Connected = true;
184+
185+ WriteCmd(cmd);
186+
187+ if(cheSetup->Checked == false)
188+ Com->Connected = false;
189+
190+ }
191+ catch ( ... )
192+ {
193+ ShowMessage("Comport Open Fail");
194+ }
195+}
196+//---------------------------------------------------------------------------
197+
198+void __fastcall TfrmMain::vtGridGetNodeDataSize(TBaseVirtualTree *Sender, int &NodeDataSize)
199+
200+{
201+ NodeDataSize = sizeof(fifo_t);
202+
203+}
204+//---------------------------------------------------------------------------
205+
206+void __fastcall TfrmMain::vtGridGetText(TBaseVirtualTree *Sender, PVirtualNode Node,
207+ TColumnIndex Column, TVSTTextType TextType, UnicodeString &CellText)
208+
209+{
210+//
211+ BYTE * pD;
212+ UnicodeString hex = "00";
213+ if(Node == NULL) return;
214+
215+ fifo_t * fifo = (fifo_t *)Sender->GetNodeData(Node);
216+
217+ if(fifo == NULL) return;
218+
219+ pD = (BYTE *)fifo;
220+ hex.sprintf(L"%02x",pD[Column]);
221+ CellText = hex;
222+}
223+//---------------------------------------------------------------------------
224+
225+
226+void __fastcall TfrmMain::vtGridClick(TObject *Sender)
227+{
228+ UnicodeString strTmp;
229+ WORD tmp16,tmp16O;
230+ float tmpF;
231+ int temp,temp2;
232+
233+ if (!vtGrid->FocusedNode)
234+ return;
235+
236+
237+ fifo_t *fifo = (fifo_t *)vtGrid->GetNodeData(vtGrid->FocusedNode);
238+
239+ cbxS1->ItemIndex = fifo->slave_id[3];
240+ cbxS2->ItemIndex = fifo->slave_id[4];
241+ cbxS3->ItemIndex = fifo->slave_id[5];
242+
243+
244+ tmp16 = ((fifo->opt.env_data[0] << 8) & 0xff00) | fifo->opt.env_data[1];
245+
246+ if(fifo->opt.env_data[5] == 0x80)
247+ tmp16O = tmp16 - fifo->opt.env_data[4];
248+ else
249+ tmp16O = tmp16 + fifo->opt.env_data[4];
250+
251+ temp = ((int)tmp16 - (int)0x2ba) / 2;
252+ temp2 = ((int)tmp16O - (int)0x2ba) / 2;
253+
254+ m_temp = tmp16;
255+ lblTemp->Caption = strTmp.sprintf(L"0x%04x(%d C)",tmp16,temp);
256+ lblAdjT->Caption = strTmp.sprintf(L"ADJ %dC",temp2);
257+
258+ cbxAf->ItemIndex = fifo->opt.env_data[2];
259+ cbxFS->ItemIndex = fifo->opt.env_data[3] == 0x80 ? 1 : 0;
260+ cbxAt->ItemIndex = fifo->opt.env_data[4];
261+ cbxTs->ItemIndex = fifo->opt.env_data[5] == 0x80 ? 1 : 0;
262+
263+ lblVer->Caption = strTmp.sprintf(L"0x%02x",fifo->version_l);
264+
265+ if(fifo->user_data0 & 0x08)
266+ cheS1->Checked = true;
267+ else
268+ cheS1->Checked = false;
269+
270+ if(fifo->user_data0 & 0x04)
271+ cheS2->Checked = true;
272+ else
273+ cheS2->Checked = false;
274+
275+ if(fifo->user_data0 & 0x02)
276+ cheTampa->Checked = true;
277+ else
278+ cheTampa->Checked = false;
279+
280+ if(fifo->user_data0 & 0x01)
281+ cheBat->Checked = true;
282+ else
283+ cheBat->Checked = false;
284+
285+ cbxSch->ItemIndex = fifo->user_data1 & 0x03;
286+ cbxSensor->ItemIndex = (fifo->user_data1 >> 2) & 0x03;
287+
288+ tmpF = (float)fifo->bat_val * ((float)3/255);
289+ strTmp.sprintf(L"0x%02x(%1.2f V)",fifo->bat_val,tmpF);
290+ lblBat->Caption = strTmp;
291+
292+ int db;
293+ if(fifo->s_rssi >= 128)
294+ db = (fifo->s_rssi - 256)/2 - 74;
295+ else
296+ db = (fifo->s_rssi)/2 - 74;
297+
298+ strTmp.sprintf(L"0x%02x(%d mDb)",fifo->s_rssi,db);
299+ lblSlr->Caption = strTmp;
300+
301+ if(fifo->rssi >= 128)
302+ db = (fifo->rssi - 256)/2 - 74;
303+ else
304+ db = (fifo->rssi)/2 - 74;
305+ strTmp.sprintf(L"0x%02x(%d mDb)",fifo->rssi,db);
306+ lblRxr->Caption = strTmp;
307+
308+ strTmp.sprintf(L"0x%02x(%d)",fifo->s_lqi,fifo->s_lqi);
309+ lblSll->Caption = strTmp;
310+
311+ strTmp.sprintf(L"0x%02x(%d)",fifo->lqi,fifo->lqi);
312+ lblRxl->Caption = strTmp;
313+
314+ cbxLevel1->ItemIndex = (fifo->opt.level[0] >> 4 ) & 0x0f;
315+ cbxLevel2->ItemIndex = (fifo->opt.level[0] >> 0 ) & 0x0f;
316+ cbxLevel3->ItemIndex = (fifo->opt.level[1] >> 4 ) & 0x0f;
317+ cbxLevel4->ItemIndex = (fifo->opt.level[1] >> 0 ) & 0x0f;
318+ cbxLevel5->ItemIndex = (fifo->opt.level[2] >> 4 ) & 0x0f;
319+ cbxLevel6->ItemIndex = (fifo->opt.level[2] >> 0 ) & 0x0f;
320+ cbxLevel7->ItemIndex = (fifo->opt.level[3] >> 4 ) & 0x0f;
321+ cbxLevel8->ItemIndex = (fifo->opt.level[3] >> 0 ) & 0x0f;
322+ cbxLevel9->ItemIndex = (fifo->opt.level[4] >> 4 ) & 0x0f;
323+ cbxLevel10->ItemIndex = (fifo->opt.level[4] >> 0 ) & 0x0f;
324+ cbxLevel11->ItemIndex = (fifo->opt.level[5] >> 4 ) & 0x0f;
325+ cbxLevel12->ItemIndex = (fifo->opt.level[5] >> 0 ) & 0x0f;
326+ cbxLevel13->ItemIndex = (fifo->opt.level[6] >> 4 ) & 0x0f;
327+ cbxLevel14->ItemIndex = (fifo->opt.level[6] >> 0 ) & 0x0f;
328+
329+
330+}
331+//---------------------------------------------------------------------------
332+
333+
334+
335+
336+void __fastcall TfrmMain::cbxAtChange(TObject *Sender)
337+{
338+ WORD tmp16O,temp;
339+ UnicodeString strTmp;
340+
341+
342+ if(cbxTs->ItemIndex == 1)
343+ tmp16O = m_temp - cbxAt->ItemIndex;
344+ else
345+ tmp16O = m_temp + cbxAt->ItemIndex;
346+
347+ temp = ((int)tmp16O - (int)0x2ba) / 2;
348+
349+ lblAdjT->Caption = strTmp.sprintf(L"ADJ %dC",temp);
350+ lblAdjT->Refresh();
351+}
352+//---------------------------------------------------------------------------
353+
354+void __fastcall TfrmMain::WRITEClick(TObject *Sender)
355+{
356+ AnsiString cmd;
357+ BYTE level[7];
358+
359+ level[0] = ((cbxLevel1->ItemIndex << 4 ) & 0xf0) | ((cbxLevel2->ItemIndex << 0 ) & 0x0f);
360+ level[1] = ((cbxLevel3->ItemIndex << 4 ) & 0xf0) | ((cbxLevel4->ItemIndex << 0 ) & 0x0f);
361+ level[2] = ((cbxLevel5->ItemIndex << 4 ) & 0xf0) | ((cbxLevel6->ItemIndex << 0 ) & 0x0f);
362+ level[3] = ((cbxLevel7->ItemIndex << 4 ) & 0xf0) | ((cbxLevel8->ItemIndex << 0 ) & 0x0f);
363+ level[4] = ((cbxLevel9->ItemIndex << 4 ) & 0xf0) | ((cbxLevel10->ItemIndex << 0 ) & 0x0f);
364+ level[5] = ((cbxLevel11->ItemIndex << 4 ) & 0xf0) | ((cbxLevel12->ItemIndex << 0 ) & 0x0f);
365+ level[6] = ((cbxLevel13->ItemIndex << 4 ) & 0xf0) | ((cbxLevel14->ItemIndex << 0 ) & 0x0f);
366+
367+
368+
369+ cmd.sprintf("setenv write %02x%02x%02x %02x %02x%02x%02x%02x %02x%02x%02x%02x%02x%02x%02x\r"
370+ ,cbxS1->ItemIndex
371+ ,cbxS2->ItemIndex
372+ ,cbxS3->ItemIndex
373+ ,0x00
374+ ,cbxAf->ItemIndex
375+ ,cbxFS->ItemIndex == 0 ? 0x00 : 0x80
376+ ,cbxAt->ItemIndex
377+ ,cbxTs->ItemIndex == 0 ? 0x00 : 0x80
378+ ,level[0],level[1],level[2],level[3]
379+ ,level[4],level[5],level[6]);
380+
381+ WriteCmd(cmd);
382+}
383+//---------------------------------------------------------------------------
384+
385+void __fastcall TfrmMain::btnClearClick(TObject *Sender)
386+{
387+
388+ vtGrid->Clear();
389+
390+}
391+//---------------------------------------------------------------------------
392+
393+
--- trunk/WireCmd/Release/DevSet.ini (nonexistent)
+++ trunk/WireCmd/Release/DevSet.ini (revision 2609)
@@ -0,0 +1,7 @@
1+[Com]
2+Port=COM20
3+BaudRate=9600
4+StopBits=1
5+DataBits=8
6+Parity=None
7+FlowControl=None
--- trunk/WireCmd/Wireless.h (nonexistent)
+++ trunk/WireCmd/Wireless.h (revision 2609)
@@ -0,0 +1,153 @@
1+//---------------------------------------------------------------------------
2+
3+#ifndef WirelessH
4+#define WirelessH
5+//---------------------------------------------------------------------------
6+#include <Classes.hpp>
7+#include <Controls.hpp>
8+#include <StdCtrls.hpp>
9+#include <Forms.hpp>
10+#include "CPortCtl.hpp"
11+#include <ExtCtrls.hpp>
12+#include "CPort.hpp"
13+#include <process.h>
14+#include "VirtualTrees.hpp"
15+#include "AdvSplitter.hpp"
16+//---------------------------------------------------------------------------
17+typedef unsigned char u8;
18+
19+#pragma pack(1)
20+
21+typedef struct _fifo_option_
22+{
23+ u8 env_data[8];
24+ u8 level[7];
25+}f_option_t;
26+
27+
28+typedef struct _txfifo_data_
29+{
30+ u8 length;
31+ u8 slave_id[6];
32+ u8 master_id[3];
33+ u8 user_data0;
34+ u8 user_data1;
35+ u8 bat_val;
36+ u8 master_ctl;
37+ u8 setup_mode;
38+ u8 version_l;
39+ u8 rssi;
40+ u8 lqi;
41+ f_option_t opt;
42+ u8 s_rssi;
43+ u8 s_lqi;
44+}fifo_t;
45+#pragma pack()
46+class TfrmMain : public TForm
47+{
48+__published: // IDE-managed Components
49+ TComPort *Com;
50+ TTimer *Timer1;
51+ TPanel *Panel1;
52+ TPanel *Panel2;
53+ TCheckBox *cheSetup;
54+ TButton *btnSetup;
55+ TPanel *Panel3;
56+ TAdvSplitter *AdvSplitter1;
57+ TPanel *Panel4;
58+ TVirtualStringTree *vtGrid;
59+ TGroupBox *GroupBox1;
60+ TPanel *Panel5;
61+ TPanel *Panel8;
62+ TPanel *Panel9;
63+ TPanel *Panel10;
64+ TPanel *Panel12;
65+ TPanel *Panel11;
66+ TPanel *Panel17;
67+ TPanel *Panel18;
68+ TGroupBox *GroupBox2;
69+ TPanel *Panel16;
70+ TPanel *Panel14;
71+ TPanel *Panel15;
72+ TPanel *Panel13;
73+ TPanel *Panel6;
74+ TCheckBox *cheS1;
75+ TCheckBox *cheS2;
76+ TCheckBox *cheTampa;
77+ TCheckBox *cheBat;
78+ TPanel *Panel19;
79+ TLabel *lblBat;
80+ TLabel *lblSlr;
81+ TComboBox *cbxSensorUsed;
82+ TLabel *lblRxr;
83+ TLabel *lblRxl;
84+ TLabel *lblSll;
85+ TLabel *lblVer;
86+ TLabel *lblTemp;
87+ TComboBox *ComboBox1;
88+ TComboBox *ComboBox2;
89+ TComboBox *ComboBox3;
90+ TGroupBox *GroupBox3;
91+ TPanel *Panel20;
92+ TPanel *Panel21;
93+ TPanel *Panel22;
94+ TPanel *Panel23;
95+ TPanel *Panel24;
96+ TPanel *Panel25;
97+ TComboBox *cbxSensor;
98+ TComboBox *cbxS1;
99+ TComboBox *cbxS2;
100+ TComboBox *cbxS3;
101+ TComboBox *cbxAf;
102+ TComboBox *cbxFS;
103+ TComboBox *cbxAt;
104+ TComboBox *cbxTs;
105+ TButton *WRITE;
106+ TComboBox *cbxSch;
107+ TLabel *lblAdjT;
108+ TButton *btnClear;
109+ TComboBox *cbxLevel1;
110+ TComboBox *cbxLevel2;
111+ TComboBox *cbxLevel3;
112+ TComboBox *cbxLevel4;
113+ TComboBox *cbxLevel5;
114+ TComboBox *cbxLevel6;
115+ TComboBox *cbxLevel7;
116+ TComboBox *cbxLevel8;
117+ TComboBox *cbxLevel9;
118+ TComboBox *cbxLevel10;
119+ TComboBox *cbxLevel11;
120+ TComboBox *cbxLevel12;
121+ TComboBox *cbxLevel13;
122+ TComboBox *cbxLevel14;
123+ TLabel *Label1;
124+ TLabel *Label2;
125+ void __fastcall FormCreate(TObject *Sender);
126+ void __fastcall ComRxChar(TObject *Sender, int Count);
127+ void __fastcall Timer1Timer(TObject *Sender);
128+ void __fastcall btnSetupClick(TObject *Sender);
129+ void __fastcall cheSetupClick(TObject *Sender);
130+ void __fastcall vtGridGetNodeDataSize(TBaseVirtualTree *Sender, int &NodeDataSize);
131+ void __fastcall vtGridGetText(TBaseVirtualTree *Sender, PVirtualNode Node, TColumnIndex Column,
132+ TVSTTextType TextType, UnicodeString &CellText);
133+ void __fastcall vtGridClick(TObject *Sender);
134+ void __fastcall cbxAtChange(TObject *Sender);
135+ void __fastcall WRITEClick(TObject *Sender);
136+ void __fastcall btnClearClick(TObject *Sender);
137+
138+private: // User declarations
139+public: // User declarations
140+ bool bCmdMode;
141+ WORD m_temp;
142+ AnsiString strRes;
143+ HANDLE hReadEvent;
144+ fifo_t m_rFifo;
145+
146+ void DumpDataGrid(BYTE * data,int len);
147+ bool WriteCmd(AnsiString cmd);
148+ __fastcall TfrmMain(TComponent* Owner);
149+};
150+//---------------------------------------------------------------------------
151+extern PACKAGE TfrmMain *frmMain;
152+//---------------------------------------------------------------------------
153+#endif
Show on old repository browser