AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren

Comparing functions

Ein Thema von Razor · begonnen am 28. Aug 2007 · letzter Beitrag vom 8. Nov 2007
 
Razor
(Gast)

n/a Beiträge
 
#1

Comparing functions

  Alt 28. Aug 2007, 20:06
From IO driver #1

Delphi-Quellcode:
 procedure GetPCIRDWord(dwBus, dwDev, dwFunc, offs: byte; var pdata: DWord);
 procedure SetPCIRDWord(dwBus, dwDev, dwFunc, offs: byte; pdata: DWord);


From IO driver #2

Delphi-Quellcode:
function GetPCRD(Bus, Dev, Func, Reg : byte): dword;
procedure SetPCRD(Bus, Dev, Func, Reg : byte; value : dword);

Can driver 2 functions be used same as driver 1 in this way

Delphi-Quellcode:
var
  dwResult : DWORD;
begin
  //-------Reading a temperature of the Core0----------
  dwResult:=GetPCRD(0,24,$03,$E4);
  SetPCRD(0,24,$03,$E4, dwResult and not (1 shl 2)); //Core0 select
  dwResult:=GetPCRD(0,24,$03,$E4);
  C0:= Format('%d °C',[(dwResult shr 16 and $FF)-49]);
  Label0.Caption := C0;
  Form1.Caption:= C0;
  Application.Title:= C0;
  if not Core2Present then Exit;

  //-------Reading a temperature of the Core1----------
  dwResult:=GetPCRD(0,24,$03,$E4);
  SetPCRD(0,24,$03,$E4, dwResult or (1 shl 2)); //Core1 select
  dwResult:=GetPCRD(0,24,$03,$E4);
  Label1.Caption := Format('%d °C',[(dwResult shr 16 and $FF)-49]);


I have tried it this way but i can't even compile this becouse IDE gives an error Internal L1333 error.

Delphi-Quellcode:
var
  pdata : DWORD;
begin
  //-------Reading a temperature of the Core0----------
  GetPCIRDWord(0,24,$03,$E4,pdata);
  SetPCIRDWord(0,24,$03,$E4, pdata and not (1 shl 2)); //Core0 select
  GetPCIRDWord(0,24,$03,$E4,pdata);
  C0:= Format('%d °C',[(pdata shr 16 and $FF)-49]);
  Label0.Caption := C0;
  Form1.Caption:= C0;
  Application.Title:= C0;
  if not Core2Present then Exit;

  //-------Reading a temperature of the Core1----------
  GetPCIRDWord(0,24,$03,$E4,pdata);
  SetPCIRDWord(0,24,$03,$E4, pdata or (1 shl 2)); //Core1 select
  GetPCIRDWord(0,24,$03,$E4,pdata);
  Label1.Caption := Format('%d °C',[(pdata shr 16 and $FF)-49]);





Thanks!
  Mit Zitat antworten Zitat
 

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:32 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz