Changeset 370 for ISPProgrammer
- Timestamp:
- May 31, 2012, 6:29:12 AM (13 years ago)
- Location:
- ISPProgrammer
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
ISPProgrammer/Dallas/UDallasProgrammer.pas
r363 r370 44 44 procedure LoadFromRegistry(Root: HKEY; Key: string); override; 45 45 procedure SaveToRegistry(Root: HKEY; Key: string); override; 46 procedure Read ; override;47 procedure Write ; override;46 procedure Read(Job: TJob); override; 47 procedure Write(Job: TJob); override; 48 48 procedure Erase; override; 49 procedure Verify ; override;49 procedure Verify(Job: TJob); override; 50 50 procedure Reset; override; 51 51 function ReadIdentification: string; override; … … 212 212 end; 213 213 214 procedure TDallasProgrammer.Read ;214 procedure TDallasProgrammer.Read(Job: TJob); 215 215 var 216 216 Value: string; … … 236 236 237 237 //HexFile.SaveToStringList(HexData); 238 Job ProgressView.CurrentJob.Progress.Max := 65535 div 32;238 Job.Progress.Max := 65535 div 32; 239 239 //Request.Size := 0; 240 240 //ResponseClear; … … 266 266 ResponseLock.Release; 267 267 end; 268 Job ProgressView.CurrentJob.Progress.Value := I;269 if Job ProgressView.CurrentJob.Terminate then Break;268 Job.Progress.Value := I; 269 if Job.Terminate then Break; 270 270 until False; 271 271 //for I := 0 to HexData.Count - 1 do 272 272 // Log(HexData[I]); 273 if not Job ProgressView.CurrentJob.Terminate then273 if not Job.Terminate then 274 274 HexFile.LoadFromStringList(HexData); 275 275 end; 276 276 277 procedure TDallasProgrammer.Verify ;277 procedure TDallasProgrammer.Verify(Job: TJob); 278 278 var 279 279 Value: string; … … 292 292 end; 293 293 HexFile.SaveToStringList(HexData); 294 Job ProgressView.CurrentJob.Progress.Max := HexData.Count;294 Job.Progress.Max := HexData.Count; 295 295 for I := 0 to HexData.Count - 1 do begin 296 296 Request.Size := 0; … … 311 311 end; 312 312 CheckErrorCode(Value); 313 Job ProgressView.CurrentJob.Progress.Value := I;314 if Job ProgressView.CurrentJob.Terminate then Break;315 end; 316 end; 317 318 procedure TDallasProgrammer.Write ;313 Job.Progress.Value := I; 314 if Job.Terminate then Break; 315 end; 316 end; 317 318 procedure TDallasProgrammer.Write(Job: TJob); 319 319 var 320 320 Value: string; … … 333 333 end; 334 334 HexFile.SaveToStringList(HexData); 335 Job ProgressView.CurrentJob.Progress.Max := HexData.Count;335 Job.Progress.Max := HexData.Count; 336 336 for I := 0 to HexData.Count - 1 do begin 337 337 Request.Size := 0; … … 352 352 end; 353 353 CheckErrorCode(Value); 354 Job ProgressView.CurrentJob.Progress.Value := I;355 if Job ProgressView.CurrentJob.Terminate then Break;354 Job.Progress.Value := I; 355 if Job.Terminate then Break; 356 356 end; 357 357 end; -
ISPProgrammer/ISPprog/UISPprog.pas
r363 r370 26 26 public 27 27 constructor Create; override; 28 procedure Write ; override;29 procedure Read ; override;30 procedure Verify ; override;28 procedure Write(Job: TJob); override; 29 procedure Read(Job: TJob); override; 30 procedure Verify(Job: TJob); override; 31 31 procedure Erase; override; 32 32 procedure Reset; override; … … 149 149 { TISPProg } 150 150 151 procedure TISPProg.Write ;151 procedure TISPProg.Write(Job: TJob); 152 152 var 153 153 res: string; … … 212 212 maxadr:=maxadr or pagemask; // round up to page size 213 213 radr:=minadr; 214 Job ProgressView.CurrentJob.Progress.Max := maxadr - minadr + 1;214 Job.Progress.Max := maxadr - minadr + 1; 215 215 while radr <= maxadr do begin 216 216 if (proctype = PROC_TYPE_AVR) and (flashsize > 1024*128) then … … 233 233 end; 234 234 radr := radr + pagesize; 235 Job ProgressView.CurrentJob.Progress.Value := radr - minadr;236 if Job ProgressView.CurrentJob.Terminate then Break;235 Job.Progress.Value := radr - minadr; 236 if Job.Terminate then Break; 237 237 end; 238 238 Log(SProgramOK); … … 263 263 end; 264 264 radr := radr + pagesize; 265 Job ProgressView.CurrentJob.Progress.Value := radr - minadr;265 Job.Progress.Value := radr - minadr; 266 266 end; 267 267 Log(SProgramOK); … … 284 284 end; 285 285 end; 286 Job ProgressView.CurrentJob.Progress.Value := radr - minadr;286 Job.Progress.Value := radr - minadr; 287 287 end; 288 288 LedOff; … … 295 295 end; 296 296 297 procedure TISPProg.Verify ;297 procedure TISPProg.Verify(Job: TJob); 298 298 begin 299 299 inherited; -
ISPProgrammer/PRESTO/UPresto.pas
r363 r370 8 8 9 9 uses 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; 12 13 13 14 type … … 33 34 procedure SaveToRegistry(Root: HKEY; Key: string); override; 34 35 function ReadIdentification: string; override; 35 procedure Write ; override;36 procedure Verify ; override;36 procedure Write(Job: TJob); override; 37 procedure Verify(Job: TJob); override; 37 38 procedure Erase; override; 38 39 procedure Reset; override; … … 46 47 47 48 {$IFDEF Windows} 48 49 uses50 UJobProgressView;51 52 const53 TempHexFile = 'Dump.hex';54 49 55 50 resourcestring … … 279 274 end; 280 275 281 procedure TPrestoProgrammer.Write ;276 procedure TPrestoProgrammer.Write(Job: TJob); 282 277 var 283 278 Address, I, PageSize, MinAdr, MaxAdr: Integer; … … 312 307 // AT89S8253, AT89S2051/4051, AT89S51/52, AVRs with page programming 313 308 PageSize := Signatures[devicenr].fpagesize; 314 Job ProgressView.CurrentJob.Progress.Max := MaxAdr;309 Job.Progress.Max := MaxAdr; 315 310 WritePage.Size := PageSize; 316 311 ReadPage.Size := PageSize; … … 361 356 Inc(Address); 362 357 end; 363 Job ProgressView.CurrentJob.Progress.Value := Address;364 if Job ProgressView.CurrentJob.Terminate then Break;358 Job.Progress.Value := Address; 359 if Job.Terminate then Break; 365 360 end; 366 361 Log(SProgramOK); … … 372 367 end; 373 368 374 procedure TPrestoProgrammer.Verify ;375 begin 376 inherited Verify;369 procedure TPrestoProgrammer.Verify(Job: TJob); 370 begin 371 inherited; 377 372 end; 378 373 … … 446 441 procedure TPrestoProgrammer.ISPWriteFlashPage(Address: Integer; Buffer: TStream); 447 442 var 448 pagesize, pagemask , raddr: integer;443 pagesize, pagemask: integer; 449 444 Data: TStreamHelper; 450 ptr: ^byte;451 445 begin 452 446 try … … 536 530 537 531 procedure TPrestoProgrammer.SetActive(AValue: Boolean); 538 var539 Answer: Integer;540 532 begin 541 533 if Active = AValue then Exit; -
ISPProgrammer/RFU/URFUProgrammer.pas
r363 r370 6 6 7 7 uses 8 Classes, SysUtils, Forms, UISPProgrammer, UCPUType, Process ;8 Classes, SysUtils, Forms, UISPProgrammer, UCPUType, Process, UJobProgressView; 9 9 10 10 type … … 13 13 14 14 TRFUProgrammer = class(TISPProgrammer) 15 procedure Write ; override;16 procedure Verify ; override;15 procedure Write(Job: TJob); override; 16 procedure Verify(Job: TJob); override; 17 17 procedure Erase; override; 18 18 procedure Reset; override; … … 26 26 { TRFUProgrammer } 27 27 28 procedure TRFUProgrammer.Write ;28 procedure TRFUProgrammer.Write(Job: TJob); 29 29 begin 30 inherited Write;30 inherited; 31 31 with TProcess.Create(nil) do 32 32 try … … 41 41 end; 42 42 43 procedure TRFUProgrammer.Verify ;43 procedure TRFUProgrammer.Verify(Job: TJob); 44 44 begin 45 inherited Verify;45 inherited; 46 46 end; 47 47 -
ISPProgrammer/UISPProgrammer.pas
r363 r370 7 7 uses 8 8 Classes, SysUtils, Registry, UIntelHexFile, UCommSerialPort, 9 UCPUType ;9 UCPUType, UJobProgressView; 10 10 11 11 type … … 34 34 procedure LoadFromRegistry(Root: HKEY; Key: string); virtual; 35 35 procedure SaveToRegistry(Root: HKEY; Key: string); virtual; 36 procedure Write ; virtual;37 procedure Read ; virtual;38 procedure Verify ; virtual;36 procedure Write(Job: TJob); virtual; 37 procedure Read(Job: TJob); virtual; 38 procedure Verify(Job: TJob); virtual; 39 39 procedure Erase; virtual; 40 40 procedure Reset; virtual; … … 86 86 end; 87 87 88 procedure TISPProgrammer.Write ;88 procedure TISPProgrammer.Write(Job: TJob); 89 89 begin 90 90 raise Exception.Create(SNotImplemented); 91 91 end; 92 92 93 procedure TISPProgrammer.Read ;93 procedure TISPProgrammer.Read(Job: TJob); 94 94 begin 95 95 raise Exception.Create(SNotImplemented); 96 96 end; 97 97 98 procedure TISPProgrammer.Verify ;98 procedure TISPProgrammer.Verify(Job: TJob); 99 99 begin 100 100 raise Exception.Create(SNotImplemented);
Note:
See TracChangeset
for help on using the changeset viewer.