Ignore:
Timestamp:
May 31, 2012, 6:29:12 AM (12 years ago)
Author:
chronos
Message:
  • Modified: ISPProgrammer now use updated component oriented TJobProgressView from Common package.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ISPProgrammer/PRESTO/UPresto.pas

    r363 r370  
    88
    99uses
    10   Classes, SysUtils, UISPProgrammer, URegistry, UPrestoDLL,
    11   UStreamHelper, Globals, Processors, Delays, UCPUType, Registry;
     10  Classes, SysUtils, UISPProgrammer, UPrestoDLL,
     11  UStreamHelper, Globals, Processors, Delays, UCPUType, Registry,
     12  UJobProgressView;
    1213
    1314type
     
    3334    procedure SaveToRegistry(Root: HKEY; Key: string); override;
    3435    function ReadIdentification: string; override;
    35     procedure Write; override;
    36     procedure Verify; override;
     36    procedure Write(Job: TJob); override;
     37    procedure Verify(Job: TJob); override;
    3738    procedure Erase; override;
    3839    procedure Reset; override;
     
    4647
    4748{$IFDEF Windows}
    48 
    49 uses
    50   UJobProgressView;
    51 
    52 const
    53   TempHexFile = 'Dump.hex';
    5449
    5550resourcestring
     
    279274end;
    280275
    281 procedure TPrestoProgrammer.Write;
     276procedure TPrestoProgrammer.Write(Job: TJob);
    282277var
    283278  Address, I, PageSize, MinAdr, MaxAdr: Integer;
     
    312307    // AT89S8253, AT89S2051/4051, AT89S51/52, AVRs with page programming
    313308    PageSize := Signatures[devicenr].fpagesize;
    314     JobProgressView.CurrentJob.Progress.Max := MaxAdr;
     309    Job.Progress.Max := MaxAdr;
    315310    WritePage.Size := PageSize;
    316311    ReadPage.Size := PageSize;
     
    361356        Inc(Address);
    362357      end;
    363       JobProgressView.CurrentJob.Progress.Value := Address;
    364       if JobProgressView.CurrentJob.Terminate then Break;
     358      Job.Progress.Value := Address;
     359      if Job.Terminate then Break;
    365360    end;
    366361    Log(SProgramOK);
     
    372367end;
    373368
    374 procedure TPrestoProgrammer.Verify;
    375 begin
    376   inherited Verify;
     369procedure TPrestoProgrammer.Verify(Job: TJob);
     370begin
     371  inherited;
    377372end;
    378373
     
    446441procedure TPrestoProgrammer.ISPWriteFlashPage(Address: Integer; Buffer: TStream);
    447442var
    448   pagesize, pagemask, raddr: integer;
     443  pagesize, pagemask: integer;
    449444  Data: TStreamHelper;
    450   ptr: ^byte;
    451445begin
    452446  try
     
    536530
    537531procedure TPrestoProgrammer.SetActive(AValue: Boolean);
    538 var
    539   Answer: Integer;
    540532begin
    541533  if Active = AValue then Exit;
Note: See TracChangeset for help on using the changeset viewer.