//---------------------------------------------------------------------------

#ifndef USBTest_FormH
#define USBTest_FormH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <ExtCtrls.hpp>

#include "environment.h"
#include "TntButtons.hpp"
#include "TntExtCtrls.hpp"
#include "TntStdCtrls.hpp"
#include "TntForms.hpp"
//---------------------------------------------------------------------------
class TUSBTestForm : public TTntForm
{
__published:	// IDE-managed Components
	TTntLabel *Label1;
	TTntMemo *LogMemo;
	TTntEdit *Edit1;
	TTntButton *btnEcho;
	TTntButton *btnEcho1K;
	TTntButton *btnEcho96K;
	TTntButton *btnRepeatShortData;
	TTntButton *btnRepeatLongData;
	TTntButton *Button1;
	TTntButton *btnRepeatHugeData;
	TTimer *StatusTimer;
	TTntPanel *Panel1;
	TTntSpeedButton *sbSPB1;
	TTntSpeedButton *sbSPB2;
	TTntSpeedButton *sbSPB3;
	TTntSpeedButton *sbSPB4;
	TTntSpeedButton *sbHCB1;
	TTntPanel *TestPanel;
    TTntButton *DeviceRecoverButton;
    TTntButton *IncrementPacketSizeTestButton;
    TTntButton *DecrementPacketSizeTestButton;
	TTntButton *Button2;
	TTntButton *Button3;
	TTntButton *Button4;
	TTntButton *Button5;
	TTntButton *Button6;
	void __fastcall sbBoardClick(TObject *Sender);
	void __fastcall btnRepeatShortDataClick(TObject *Sender);
	void __fastcall btnRepeatLongDataClick(TObject *Sender);
	void __fastcall btnRepeatHugeDataClick(TObject *Sender);
    void __fastcall DeviceRecoverButtonClick(TObject *Sender);
    void __fastcall IncrementPacketSizeTestButtonClick(TObject *Sender);
    void __fastcall DecrementPacketSizeTestButtonClick(TObject *Sender);
	void __fastcall Button2Click(TObject *Sender);
	void __fastcall Button3Click(TObject *Sender);
	void __fastcall Button4Click(TObject *Sender);
	void __fastcall FormActivate(TObject *Sender);
	void __fastcall Button5Click(TObject *Sender);
	void __fastcall Button6Click(TObject *Sender);
    
private:	// User declarations
	bool bLoopTransfer;

	//TUSBConnection *TestUSBConnection;
	int TestCommIndex;
public:		// User declarations
	__fastcall TUSBTestForm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TUSBTestForm *USBTestForm;
//---------------------------------------------------------------------------
#endif
