This commit is contained in:
2026-01-08 19:04:51 +01:00
parent b9305ab8af
commit cb039a3035
14 changed files with 723 additions and 338 deletions
@@ -14,7 +14,7 @@ type
procedure Cls;
procedure GotoXY( x,y: word);
procedure putc( const c: AnsiChar);
// procedure puts( const s: AnsiString);
procedure puts( const s: AnsiString);
end;
implementation
@@ -429,7 +429,7 @@ begin
// blk.Address;
// blk.BlockLength;
s := Format('%3d %4.4x-%4.4x (%4.4x)'#13, [i,blk.Address,blk.Address+blk.BlockLength, blk.BlockLength]);
writeln(s);
// writeln(s);
INC(i);
end;
+23 -17
View File
@@ -41,7 +41,7 @@ type
// -----------------------------------------------------------------------------------
// TTrinity
// -----------------------------------------------------------------------------------
TTrinity = class (TUsbDevice, ITrinity, IIIC, ILCD, ILED, IEEPROM, IJTAG, ICFG)
TTrinity = class (TUsbDevice)
protected
fCaps : TCapabilities;
fCaps64 : Int64;
@@ -76,17 +76,17 @@ type
fModCFG : ICFG;
fModIIC : IIIC;
fModEPR : IEEPROM;
fModJTAG : IJTAG;
fModJTG : IJTAG;
fModLCD : ILCD;
fModLED : ILED;
protected
property cfg : ICFG read fModCFG implements ICFG;
property iic : IIIC read fModIIC implements IIIC;
property eeprom : IEEPROM read fModEPR implements IEEPROM;
property jtag : IJTAG read fModJTAG implements IJTAG;
property lcd : ILCD read fModLCD implements ILCD;
property led : ILED read fModLED implements ILED;
public
property cfg : ICFG read fModCFG;
property iic : IIIC read fModIIC;
property eeprom : IEEPROM read fModEPR;
property jtag : IJTAG read fModJTG;
property lcd : ILCD read fModLCD;
property led : ILED read fModLED;
// ----------------------------------------------------------------------
// construction / destruction
@@ -159,12 +159,12 @@ begin
fPipe0Class := TTrinityPipe0;
fModCFG := TmodCFG .Create( self);
fModIIC := TmodIIC .Create( self);
fModEPR := TmodEEPROM .Create( self);
fModLCD := TmodLCD .Create( self);
fModLED := TmodLED .Create( self);
fModJTAG := TmodJTAG .Create( self);
fModCFG := TmodCFG .Create( self);
fModIIC := TmodIIC .Create( self);
fModEPR := TmodEEPROM .Create( self);
fModLCD := TmodLCD .Create( self);
fModLED := TmodLED .Create( self);
fModJTG := TmodJTAG .Create( self);
end;
// ================================================================================================
@@ -172,11 +172,16 @@ end;
// ================================================================================================
procedure TTrinity.BeforeDestruction;
begin
fModCFG := nil;
fModIIC := nil;
fModEPR := nil;
fModLCD := nil;
fModLED := nil;
fModJTG := nil;
inherited
end;
function TTrinity.Capabilities: TCapabilities;
begin
result := fCaps
@@ -244,6 +249,7 @@ begin
fCaps64 := PInt64(@buf)^;
fCaps := DecodeCapabilities(fCaps64);
end
end
end;
@@ -86,7 +86,7 @@ begin
if cap in caps then
begin
if result <> '' then
result := result +',';
result := result +', ';
case cap of
capSER : result := result +'SER';
@@ -99,9 +99,7 @@ begin
capLCD2 : result := result +'LCD2';
end;
end;
end
end;
end.