
- 1
- 2

Alle geräte werden ohne fehler angezeigt. Also 256 geräte
|
|
C/C++-Quelltext |
1 2 3 4 5 6 7 |
value = PortIn(SMBus_port); if(value & 0x4) ret=4; if(value & 0x1) ret=5; *data=daten; return ret; |
also fehler von controller kommt nicht
aber es werden trozdem alle geräte als vorhanden angezeigt
hier ist dump mit ersten byte überprüfung auf 0xFF
|
|
C/C++-Quelltext |
1 2 3 4 5 6 7 8 9 |
ant=ReadByteSMBus(Get_SMBus_Adress(),i,0,&daten); if (ant==0) { if(daten!=0xFF) { adressen[adressen_c]=i; adressen_c++; } } |
Spoiler
Device adresse: 0x38
1 0 0 0 0 40 2C 14 80 B4 8 0 7C 4 0 0 1
0 0 0 0 40 2C 14 80 B4 8 0 7C 4 0 0 1 0
0 0 0 40 2C 14 80 B4 8 0 7C 4 0 0 1 0 0
0 0 40 2C 14 80 B4 8 0 7C 4 0 0 1 0 0 0
0 40 2C 14 80 B4 8 0 7C 4 0 0 1 0 0 0 0
40 2C 14 80 B4 8 0 7C 4 0 0 1 0 0 0 0 40
2C 14 80 B4 8 0 7C 4 0 0 1 0 0 0 0 40 2C
14 80 B4 8 0 7C 4 0 0 1 0 0 0 0 40 2C 14
80 B4 8 0 7C 4 0 0 1 0 0 0 0 40 2C 14 80
B4 8 0 7C 4 0 0 1 0 0 0 0 40 2C 14 80 B4
8 0 7C 4 0 0 1 0 0 0 0 40 2C 14 80 B4 8
0 7C 4 0 0 1 0 0 0 0 40 2C 14 80 B4 8 0
7C 4 0 0 1 0 0 0 0 40 2C 14 80 B4 8 0 7C
4 0 0 1 0 0 0 0 40 2C 14 80 B4 8 0 7C 4
0 0 1 0 0 0 0 40 2C 14 80 B4 8 0 7C 4 0
Device adresse: 0x50
80 8 8 E A 61 40 0 5 25 40 0 82 8 0 0 C
4 38 1 2 0 3 3D 50 50 60 32 1E 32 27 80 17 25
5 12 3C 1E 1E 0 30 33 69 80 14 1E 0 0 0 3 0
0 0 0 0 0 0 0 0 0 0 0 12 4F 7F 7F 7F 7F
EF 0 0 0 0 54 65 61 6D 2D 56 61 6C 75 65 2D 38
30 30 0 0 0 0 0 0 7 26 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 AA 96 9 20 67 FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
Device adresse: 0x51
80 8 8 E A 61 40 0 5 25 40 0 82 8 0 0 C
4 38 1 2 0 3 3D 50 50 60 32 1E 32 27 80 17 25
5 12 3C 1E 1E 0 30 33 69 80 14 1E 0 0 0 3 0
0 0 0 0 0 0 0 0 0 0 0 12 4F 7F 7F 7F 7F
EF 0 0 0 0 54 65 61 6D 2D 56 61 6C 75 65 2D 38
30 30 0 0 0 0 0 0 7 26 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 AA 96 9 20 67 FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
Device adresse: 0x69
1C 0 E7 3 3 FE 2 FF 6 49 C 3B E 52 BF D0 5C
24 3 7A 4 88 8C E DE 27 10 D0 D0 FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF 0 FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF 1C 0 E7 3 3 FE 2 FF
6 49 C 3B E 52 BF D0 5C 24 3 7A 4 88 8C E DE
27 10 D0 D0 FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF 0 FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
Device adresse: 0xB8
1 0 0 0 0 40 2C 14 80 B4 8 0 7C 4 0 0 1
0 0 0 0 40 2C 14 80 B4 8 0 7C 4 0 0 1 0
0 0 0 40 2C 14 80 B4 8 0 7C 4 0 0 1 0 0
0 0 40 2C 14 80 B4 8 0 7C 4 0 0 1 0 0 0
0 40 2C 14 80 B4 8 0 7C 4 0 0 1 0 0 0 0
40 2C 14 80 B4 8 0 7C 4 0 0 1 0 0 0 0 40
2C 14 80 B4 8 0 7C 4 0 0 1 0 0 0 0 40 2C
14 80 B4 8 0 7C 4 0 0 1 0 0 0 0 40 2C 14
80 B4 8 0 7C 4 0 0 1 0 0 0 0 40 2C 14 80
B4 8 0 7C 4 0 0 1 0 0 0 0 40 2C 14 80 B4
8 0 7C 4 0 0 1 0 0 0 0 40 2C 14 80 B4 8
0 7C 4 0 0 1 0 0 0 0 40 2C 14 80 B4 8 0
7C 4 0 0 1 0 0 0 0 40 2C 14 80 B4 8 0 7C
4 0 0 1 0 0 0 0 40 2C 14 80 B4 8 0 7C 4
0 0 1 0 0 0 0 40 2C 14 80 B4 8 0 7C 4 0
Device adresse: 0xD0
80 8 8 E A 61 40 0 5 25 40 0 82 8 0 0 C
4 38 1 2 0 3 3D 50 50 60 32 1E 32 27 80 17 25
5 12 3C 1E 1E 0 30 33 69 80 14 1E 0 0 0 3 0
0 0 0 0 0 0 0 0 0 0 0 12 4F 7F 7F 7F 7F
EF 0 0 0 0 54 65 61 6D 2D 56 61 6C 75 65 2D 38
30 30 0 0 0 0 0 0 7 26 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 AA 96 9 20 67 FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
Device adresse: 0xD1
80 8 8 E A 61 40 0 5 25 40 0 82 8 0 0 C
4 38 1 2 0 3 3D 50 50 60 32 1E 32 27 80 17 25
5 12 3C 1E 1E 0 30 33 69 80 14 1E 0 0 0 3 0
0 0 0 0 0 0 0 0 0 0 0 12 4F 7F 7F 7F 7F
EF 0 0 0 0 54 65 61 6D 2D 56 61 6C 75 65 2D 38
30 30 0 0 0 0 0 0 7 26 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 AA 96 9 20 67 FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
Device adresse: 0xE9
1C 0 E7 3 3 FE 2 FF 6 49 C 3B E 52 BF D0 5C
24 3 7A 4 88 8C E DE 27 10 D0 D0 FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF 0 FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF 1C 0 E7 3 3 FE 2 FF
6 49 C 3B E 52 BF D0 5C 24 3 7A 4 88 8C E DE
27 10 D0 D0 FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF 0 FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
hier ohne überprufung
und hier quellcode von neue version
smbus_win32.7z
Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »gen4ik« (6. Oktober 2010, 22:52)
in function
|
|
C/C++-Quelltext |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
unsigned int Get_SMBus_Adress(void) { if (SMBus_adresse==0) { unsigned int i=PCI_adresse; unsigned int Adresse = 0; unsigned int PCI_Data =0; unsigned int Device_class =0; unsigned int SMBUS_adresse =0; unsigned int ii=0; for(i=PCI_adresse;i<PCI_End_adresse;i=i+PCI_Count_ad) { Adresse=i & 0xFFFFFF00; PortDWordOut (Adress_port, Adresse); PCI_Data = PortDWordIn(Data_port); if (PCI_Data != 0x0FFFFFFFF) { switch (PCI_Data) { case VDID_PIIX4: PortDWordOut (Adress_port, Adresse + 0x90); SMBUS_adresse = PortDWordIn(Data_port); break; case VDID_VIA596A: PortDWordOut (Adress_port, Adresse + 0x80); SMBUS_adresse = PortDWordIn(Data_port); break; case VDID_VIA686A: PortDWordOut (Adress_port, Adresse + 0x90); SMBUS_adresse = PortDWordIn(Data_port); break; case VDID_AMD756PM: PortDWordOut (Adress_port, Adresse + 0x58); SMBUS_adresse = PortDWordIn(Data_port); break; case VDID_AMD766PM: PortDWordOut (Adress_port, Adresse + 0x58); SMBUS_adresse = PortDWordIn(Data_port); break; case VDID_AMD768PM: PortDWordOut (Adress_port, Adresse + 0x58); SMBUS_adresse = PortDWordIn(Data_port); break; case VDID_AMD8111PM: PortDWordOut (Adress_port, Adresse + 0x58); SMBUS_adresse = PortDWordIn(Data_port); break; case ATI_SMBus: for(ii=0x10;ii<0x24;ii=ii+0x4) { PortDWordOut (Adress_port, Adresse + ii); SMBUS_adresse = PortDWordIn(Data_port); if(SMBUS_adresse) break; } break; } if(SMBUS_adresse) break; } } SMBus_adresse=(unsigned int)(SMBUS_adresse & 0x0FFF0); } return SMBus_adresse; } |
wird der PCI Bus gescant nach vendor und device id
bei mir ist das 0x43851002 // Advanced Micro Devices, Inc.","ATI RD600/RS600","ATI SMBus"
0x4385ATI SMBus0x1002ATI Technologies Inc. / Advanced Micro Devices, Inc.
0x1002ATI Technologies Inc. / Advanced Micro Devices, Inc.
0x1002 Vendor ID
0x4385 Device ID
in Base address register steht SMBus Hostcontroller adresse.
|
|
C/C++-Quelltext |
1 2 3 4 5 6 7 |
for(ii=0x10;ii<0x24;ii=ii+0x4) { PortDWordOut (Adress_port, Adresse + ii); SMBUS_adresse = PortDWordIn(Data_port); if(SMBUS_adresse) break; } |
in PCI configuration space
nicht bei jeden mainboard sind vendor und device gleich
und SMBus host adresse auch
um auf die function
|
|
C/C++-Quelltext |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
unsigned char ReadByteSMBus(unsigned int SMBus_port,unsigned char device_nummer,unsigned char cmmd,unsigned char *data) { unsigned char value=0; unsigned char daten=0; unsigned char i=0; unsigned char Device; unsigned char ret=0; unsigned long timeout=0x1000; Device=(device_nummer<<1); Device=Device | 1; PortOut(SMBus_port+4,Device);//device 7:1,read/write 0:0 -> 1=read NEWIODELAY(); PortOut(SMBus_port+3,cmmd);//device command NEWIODELAY(); PortOut(SMBus_port+2,0x48);//01001000b ;START=1 SMB_CMD =010b Byte Data NEWIODELAY(); while(timeout) { NEWIODELAY(); value = PortIn(SMBus_port); timeout--; if(value & 2) break; } if (timeout==0) { unsigned char status=0; status = PortIn(SMBus_port); if((value & 0x4)||(value & 0x1)) { PortOut(SMBus_port+2,2);//killbit value = PortIn(SMBus_port); NEWIODELAY(); PortOut(SMBus_port,value); NEWIODELAY(); daten = PortIn(SMBus_port+5); NEWIODELAY(); if(value & 0x4) return 1; if (value & 0x1) return 2; } } if(wait_busy(SMBus_port,65535)) { value = PortIn(SMBus_port); NEWIODELAY(); PortOut(SMBus_port,value); NEWIODELAY(); daten = PortIn(SMBus_port+5); return 3; } value = PortIn(SMBus_port); if(value & 0x4) ret=4; value = PortIn(SMBus_port); NEWIODELAY(); PortOut(SMBus_port,value); NEWIODELAY(); daten = PortIn(SMBus_port+5); NEWIODELAY(); *data=daten; return ret; } |
zugreifen können mus SMBus adresse vorhanden sein
wie man auf pci bus zugreifen kann ist hier beschrieben
io.dll ist in dem projekt drine sowie io.cpp und io.h .
edit jezt geht das mit device fehler wenn kein getät da ist
neues projekt oben in down load link
Dieser Beitrag wurde bereits 5 mal editiert, zuletzt von »gen4ik« (6. Oktober 2010, 23:02)
Man kann direct wie ich dach mache. Nach Vendor id suchen.
Oder man verwendet das hier
Scannen alle PCI geräte und suchen nach class code 0x0С0500 - SMBus (System Management Bus).
0x0C- Serial bus controllers
Class Code 0x0C: Serial Bus Controllers
Sub-Class Prog. I/F Description
0x00 0x00 Firewire (IEEE 1394)
0x01 0x00 ACCESS bus
0x02 0x00 SSA (Serial Storage Architecture)
0x03 0x00 USB (Universal Serial Bus)
0x04 0x00 Fibre Channel
0x05 0x00 SMBus (System Management Bus).
danach lesen wir Bar register aus.
Bei Intel ist das BAR5
bei nForce BAR1
ich lese alle barregister
sobald !=0 dann ist das die adresse
PCI Scanner
PCIBus_ver1.7z
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »gen4ik« (8. Oktober 2010, 01:06)
Es wird was daraus
SMBus scann und dump
PCI Scann und dump
wenn hoch jemand ein gefalen machen kann
und zwar Sein PCI dump schiken. Es kann von meinem programm kommen oder man benuzt ein anderes
haupsache es sind BAR register , DeviceID , VendorID und Classcode vorhanden
das programm ist für andere benuzer sicher gemacht
"Überprufung von SMBus adresse auf 0"
es kann sein das die SMBus addresse nicht gefunden wird, daswegen brauche ich paar andere mainboards
Sonst PCI damp/scann muss auf jeden pc laufen
wie pcmcia angesprochen wird weiß ich nocht nicht .
daswegen bin mir nicht sicher ob es auf laptop funktioniert
wenn jemand Infos zum pcmcia hat.
bitte posten
mit dem Textausrichtung klapt jezt auch
mann müste nur den Font ändern
|
|
C/C++-Quelltext |
1 2 3 4 5 6 7 8 9 10 |
case WM_CREATE: text_hwnd=CreateWindow("EDIT", "", WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | ES_MULTILINE | ES_WANTRETURN, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hwnd, (HMENU)IDC_MAIN_TEXT, hThisInstance, NULL); SendDlgItemMessage(hwnd, IDC_MAIN_TEXT, WM_SETFONT, (WPARAM)GetStockObject(ANSI_FIXED_FONT), MAKELPARAM(TRUE, 0)); SetWindowText(text_hwnd, "hallo"); break; |
DEFAULT_GUI_FONT in ANSI_FIXED_FONT
Quellcode
PCIBus_ver1.7z
Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »gen4ik« (8. Oktober 2010, 16:05)
auf der seite 83 ist ACPI Power Management system beschrieben
Vendor ID ................. (1106h = VIA Technologies)
Device ID ................ (3057h = ACPI Power Mgmt)
Offset 93-90 – SMBus I/O Base ....................................... RW
31-16 Reserved ........................................always reads 0
15-4 I/O Base (16-byte I/O space)................ default = 00h
3-0 Fixed ................................ always reads 0001b
SMBus register beschreibung ist auf der seite 102
Hardware monitor beschreibung auf der Seite 104
Winbond W83627EHF/EF, W83627EHG/EG
i2c interface adresse 0x48 steht hier drine datasheet.pdf. Aber bei meinem mainboard passt das nicht
The second interface uses I2C Serial Bus. W83627EHF/EHG has a programmable serial bus address.It defined at Index 48h.
kann sein das die adresse wo anders liegt
IT8712F hat keine i2c interface. Dafür aber LPC ,so was wie ISA kann man woll sagen
Dieser Beitrag wurde bereits 4 mal editiert, zuletzt von »gen4ik« (8. Oktober 2010, 21:47)
ich schreibe noch die LPC Ports dazu wenn vorhanden
und ich glaube das man bei Winbound mit POWERLED spielen kann
muss ich mal morgen ausprobieren wenn es klapt mache ein video rein
ALI
M1543 M1543C
M1535D Ali5113
ALi5119 ALi5123
ALi513x ALi514x
ALi513xB ALi513xF
Lucky Goldstar
GS82C803B PRIME3C
ITE
ITE8661 ITE8661RF
Configuration Port 0X0279h write-only
Write-data Port 0X0A79h write-only
ITE8679 ITE8680
ITE8681 ITE8671
ITE8693 ITE8673
ITE8702 ITE8703
ITE8705 so wie aussiet i2c
ITE8712 LPC 295h: 296h:
ITE8711 ITE8761
ITE8780F
National Semi Conductor
NS307 NS308
NS309 NS317
NS_338 NS351
PC Chips
PC87306 PC87332
PC87336 PC87360
PC87363 PC87364
PC87365 PC87366
PC87393 PC87417
SIS
SIS6801 SIS950
SMC
FDC37B72X FDC37B78X
SMC37C931 SMC37C93X
SMC37C93XPM SMC37C93XAPM
SMC37C93XFR SMC37C651
SMC37C653 SMC37C665
SMC37C669 SMC37C669FR
SMC37C67X SMC37C68X
SMC37C931 SMC37C93X
SMC37C93XPM SMC37C93XAPM
SMC37C93XFR SMC37B77X
SMC37M70X SMC37M60X
SMC37M61X SMC37M81X
SMC37N769 SMC37N869
SMC_92X
UMC
UMC_8663 UMC_8669
VIA
VA83C671 VIA686
VT1211 VT8231
Winbond
W83627F W83627HF LPC 295h: 296h:
W83627SF W83637HF LPC 295h: 296h:
W83637SF W83697F LPC 295h: 296h:
W83697HF W83697SF LPC 295h: 296h:
W83697UF LPC 295h: 296h:
W83787F datasheet kosten pflitig
W83877F W83877AF
W83877TF W83877ATF
W83967AF
MISC
LPC47B27X Index port (SYSOPT= 0 10k PULL-DOWN 0x02E ,SYSOPT= 1 10k PULL-UP 0x04E) dataport = indexport+1
LPC47B34X
LPC47B37X LPC47M10X
LPC47M13X LPC47M14X
LPC47M15X LPC47M19X
LPC47S42X LPC47U33X
LPC61W49X
SC1210
HMC83755
I82091 I8680663
hier noch was interesantes
http://www.almico.com/forumsensors.php
Dieser Beitrag wurde bereits 10 mal editiert, zuletzt von »gen4ik« (10. Oktober 2010, 23:27)
WDK kan man bei microsoft umsonst runterladen
Treiber
portio.7z
Testprogramm
loadtreiber.7z
Install Programm portio.sys muss in selbern directory sein!
Spoiler
![]()
C/C++-Quelltext
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 #include <iostream> #include <stdio.h> #include <windows.h> #include <winioctl.h> using namespace std; int main() { SC_HANDLE SchSCManager; SC_HANDLE schService; DWORD err; CHAR DriverFileName[80]; char aaa[100]; if (!GetSystemDirectory(DriverFileName, 55)) { printf("portio: Failed to get System Directory.\n"); } lstrcat(DriverFileName,"\\Drivers\\portio.sys"); printf("PortTalk: Copying driver to %s\n",DriverFileName); if (!CopyFile("portio.sys", DriverFileName, FALSE)) { printf("portio: Failed to copy driver to %s\n",DriverFileName); } SchSCManager = OpenSCManager (NULL, /* machine (NULL == local) */ NULL, /* database (NULL == default) */ SC_MANAGER_ALL_ACCESS); /* access required */ schService = CreateService (SchSCManager, /* SCManager database */ "portio", /* name of service */ "portio", /* name to display */ SERVICE_ALL_ACCESS, /* desired access */ SERVICE_KERNEL_DRIVER, /* service type */ SERVICE_DEMAND_START, /* start type */ SERVICE_ERROR_NORMAL, /* error control type */ "System32\\Drivers\\portio.sys", /* service's binary */ NULL, /* no load ordering group */ NULL, /* no tag identifier */ NULL, /* no dependencies */ NULL, /* LocalSystem account */ NULL /* no password */ ); if (schService == NULL) { err = GetLastError(); if (err == ERROR_SERVICE_EXISTS) printf("portio: Driver already exists. No action taken.\n"); else printf("portio: Unknown error while creating Service.\n"); } else printf("portio: Driver successfully installed.\n"); CloseServiceHandle (schService); cin >>aaa; return 0; }
Deinstall
Spoiler
![]()
C/C++-Quelltext
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 #include <iostream> #include <stdio.h> #include <windows.h> using namespace std; int main() { SC_HANDLE SchSCManager; SC_HANDLE schService; BOOL ret; SERVICE_STATUS serviceStatus; char aaa[100]; printf("Uninstall for portio V2.0\n"); printf("gen4ik 15.10.2010\n"); /* Open Handle to Service Control Manager */ SchSCManager = OpenSCManager (NULL, // machine (NULL == local) NULL, // database (NULL == default) SC_MANAGER_ALL_ACCESS); // access required /* Open Handle to PortTalk Service Database */ schService = OpenService (SchSCManager, "portio", SERVICE_ALL_ACCESS); if (schService == NULL) { printf("Error while opening portio service\n"); return(0); } /* Stop Service */ ret = ControlService (schService, SERVICE_CONTROL_STOP, &serviceStatus); if (ret) printf("portio service has been successfully stopped.\n"); else printf("Unknown error while stopping portio service.\n"); /* Delete Service */ ret = DeleteService (schService); if (ret) printf("portio service has been successfully deleted.\n"); else printf("Error removing portio service - portio has NOT been successfully removed."); printf("You may now re-install portio.\n"); /* Close Handle to Porttalk Service Database */ CloseServiceHandle (schService); /* Close Handle to Service Control Manager */ CloseServiceHandle(SchSCManager); cin >>aaa; return 0; }
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »gen4ik« (16. Oktober 2010, 10:34)
Und womit ansteuern pc oder mikrocontroller?
und bitte wenn das geht das programm posten
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »gen4ik« (3. Januar 2011, 12:16)
Ist auf nem Motherboard verbaut
SMBus Port 0x0400, Device Number 0x18, Output-Register 0x01
void WriteByteSMBus(unsigned int SMBus_port,unsigned char device_nummer,unsigned char cmmd,unsigned char odata)
{
unsigned char value=0;
unsigned char daten=0;
unsigned char i=0;
unsigned char Device;
unsigned char ret=0;
unsigned long timeout=0x1000;
Device=(device_nummer<<1);
Device=Device | 1;
Device=Device + 0x01; //Write
PortOut(SMBus_port+5,odata);
NEWIODELAY();
PortOut(SMBus_port+4,Device);//device 7:1,read/write 0:0 -> 1=read
NEWIODELAY();
PortOut(SMBus_port+3,cmmd);//device command
NEWIODELAY();
PortOut(SMBus_port+2,0x4
;//11001000b ;START=1 SMB_CMD =010b Byte Data NEWIODELAY();
}
das was rot markiert ist
Der befehl besteht aus 4 Frames
edit :
Am eigenen Komputer ist immer am besten
Ich sehe grad das "SMBUSReadByte sage jazt mal so" für mein controller auch passt.
Eine bitte wenn das fertig hast kanst du auch hier rein posten kompletes projekt .
Denke das nicht nur für mich interessant wird.
Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »gen4ik« (3. Januar 2011, 21:25)
Ob das Problem am send_cmd_smb hängt ??
Hier nochmal meine Routine gepostet vielleicht hat ja jemand noch ne Idee worans hängt
void WriteByteSMBus(unsigned int SMBus_port,unsigned char device_nummer,unsigned char cmmd,unsigned char odata)
{
unsigned char value=0;
unsigned char daten=0;
unsigned char i=0;
unsigned char Device;
unsigned char ret=0;
unsigned long timeout=0x1000;
Device=(device_nummer<<1);
Device=Device + 0x01; //Write Bit setzen
PortOut(SMBus_port+4,Device);//device 7:1,read/write 0:0 -> 1=read
NEWIODELAY();
PortOut(SMBus_port+3,cmmd);//device command
NEWIODELAY();
PortOut(SMBus_port+2,odata);
NEWIODELAY();
PortOut(SMBus_port+1,0x48;//01101000b ;START=1 SMB_CMD =010b Byte Data
NEWIODELAY();
}
PortOut(SMBus_port+4,Device);//device 7:1,read/write 0:0 -> 1=read auf 0 zu sezen?
eindlich bin ich noch in selvester party drine und das wird noch paar tage dauern
Wenn ich zu hause bin guke mir das richtig an aber das kann dauern
edit:
Lade kernel runter da ist das auch drine

hier paar links
http://www.mikrocontroller.net/articles/I2C
http://www.i2c-bus.org/de/i2c-bus/
und es fählt noch datasheet von controller was auf dein MB verbaut ist
was ist das für board überhaupt?
und wofür gpio auf MB?
Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »gen4ik« (4. Januar 2011, 23:24)
Intel® 82801BA I/O Controller
Hub 2 (ICH2) and Intel® 82801BAM
I/O Controller Hub 2 Mobile
(ICH2-M)
http://www.intel.com/Assets/PDF/datasheet/290687.pdf
der controller ist der selbe denke ich , nach frequenz habe ich nicht nachgeschaut aber müsste passen. lol
Ich denke auch nich das du in XMIT_SLVA fehler gemacht hast also wenn man weiß das man pins als ausgang schalten mus dann kann man auch komentare lesen
Nur komt natürlich die frage was du überhaupt an pins drane hast?
Wie liest du überhaupt den zustand von GPIO aus? oder wo dran siest du das?
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »gen4ik« (5. Januar 2011, 18:48)
unsigned char ReadByteSMBus(unsigned int SMBus_port,unsigned char device_nummer,unsigned char cmmd,unsigned char *data)
{
}
Wie gesagt kann alle Register einwanfrei auslesen nur schreiben klappt halt nicht.
Hab mal die Timeout-Schleife nach dem letzten Kommando PortOut(SMBus_port+2,0x4
hingehängt, läuft der immer beim Debuggen rein.Beim Lesen macht es das nicht.

- 1
- 2

Ähnliche Themen
-
Grafiken »-
Ein Problem mit einer Gif Datei-Hilfe bitte!
(17. Februar 2007, 15:04)
-
Archiv: Betriebssysteme »-
SM-Bus-Controler ?
(24. Dezember 2003, 07:56)
-
Hardware »-
Problem mit mein celeron prozessor ! Hilfe bitte ^!
(4. Dezember 2003, 22:50)
-
Games »-
Cs Headset Problem (bitte um Hilfe)
(29. August 2003, 20:21)
-
FreeWebspace »-
[Frage] Eigene WAP-Seite
(20. März 2003, 14:35)


