home *** CD-ROM | disk | FTP | other *** search
- //---------------------------------------------------------------------------
- // C++ EEPROM Programmer 1.0
- // Copyright 2004 spuntosoft@tiscali.it
- //---------------------------------------------------------------------------
- #ifndef SymmetricEncriptionUnitH
- #define SymmetricEncriptionUnitH
- //---------------------------------------------------------------------------
- #include <Classes.hpp>
- #include <Controls.hpp>
- #include <StdCtrls.hpp>
- #include <Forms.hpp>
- #include <SysUtils.hpp>
- #include "SpuntoLedComponent.hpp"
- #include "TSpuntoHardwarePortIO_unit.hpp"
- #include <ExtCtrls.hpp>
- #include <ComCtrls.hpp>
- #include <Buttons.hpp>
- #include "CSPIN.h"
- #include <Graphics.hpp>
- #include <Dialogs.hpp>
- #include <Grids.hpp>
- //---------------------------------------------------------------------------
- class TSpuntoHardwareKeyProgrammerForm : public TForm
- {
- __published: // IDE-managed Components
- TSpuntoHardwarePortIO *SpuntoHardwarePort;
- TGroupBox *COMGroupBox;
- TRadioButton *COM1RadioButton;
- TRadioButton *COM2RadioButton;
- TGroupBox *WaveformGroupBox;
- TLabel *Label1;
- TLabel *Label3;
- TTrackBar *PeriodTrackBar;
- TLabel *Label5;
- TLabel *Label6;
- TLabel *Label7;
- TGroupBox *EEPROM;
- TCSpinEdit *CSpinEditAddress;
- TCSpinEdit *CSpinEditData;
- TLabel *Label19;
- TLabel *Label20;
- TBitBtn *WriteEEPROM;
- TComboBox *ComboBoxEEPROMType;
- TLabel *Label21;
- TButton *SDA_LOW_Button;
- TButton *SDA_HIGH_Button;
- TButton *SCL_LOW_Button;
- TButton *SCL_HIGH_Button;
- TBitBtn *HardwareKeyONButton;
- TBitBtn *ReadEEPROMButton;
- TLabel *AckLabel;
- TLabel *Label2;
- TLabel *EEPROMTitleLabel;
- TLabel *EEPROMStatusLabel;
- TGroupBox *KeyGroupBox;
- TCSpinEdit *KeyAddressSpinEdit;
- TLabel *Label4;
- TLabel *Label8;
- TCSpinEdit *KeyDataSpinEdit;
- TBitBtn *CheckEEPROMButton;
- TLabel *KeyOKLabel;
- TGroupBox *Encryption;
- TStringGrid *StringGrid1;
- TBitBtn *ExecuteEncryption;
- TOpenDialog *OpenDialog1;
- TLabel *EncryptionStatusLabel;
- TLabel *Label9;
- void __fastcall PeriodTrackBarChange(TObject *Sender);
- void __fastcall FormCreate(TObject *Sender);
- void __fastcall PowerONSpeedButtonClick(TObject *Sender);
- void __fastcall COM1RadioButtonClick(TObject *Sender);
- void __fastcall COM2RadioButtonClick(TObject *Sender);
- void __fastcall WriteEEPROMClick(TObject *Sender);
- void __fastcall SCL_LOW_ButtonClick(TObject *Sender);
- void __fastcall SDA_LOW_ButtonClick(TObject *Sender);
- void __fastcall SCL_HIGH_ButtonClick(TObject *Sender);
- void __fastcall SDA_HIGH_ButtonClick(TObject *Sender);
- void __fastcall HardwareKeyONButtonClick(TObject *Sender);
- void __fastcall ReadEEPROMButtonClick(TObject *Sender);
- void __fastcall CheckEEPROMButtonClick(TObject *Sender);
- void __fastcall CSpinEditAddressChange(TObject *Sender);
- void __fastcall ExecuteEncryptionClick(TObject *Sender);
- private: // User declarations
- void HardwareDeviceSerialON(unsigned short HardwareDeviceComPort);
- byte EEPROMCheck(void);
- void TheDelay(int DelayUnit);
- void Low_SDA(void);
- void High_SDA(void);
- void Low_SCL(void);
- void High_SCL(void);
- void Start(void);
- void Stop(void);
- void Output_byte(byte Out_byte);
- byte Input_byte(void);
- byte Acknowledge(void);
- void Write_data(int Address, byte Data);
- byte Read_data(int Address);
-
- public: // User declarations
- __fastcall TSpuntoHardwareKeyProgrammerForm(TComponent* Owner);
- };
- //---------------------------------------------------------------------------
- extern PACKAGE TSpuntoHardwareKeyProgrammerForm *SpuntoHardwareKeyProgrammerForm;
- //---------------------------------------------------------------------------
- #endif
-