再问Cpu温度
我查看了些资料说winio可以读出我按照那个来发现一get就异常void Wait4Get()
{
DWORD tmp = 0;
GetPortVal(0x6c, &tmp, 1);
if (tmp != 1)
Wait4Set();
}
void Wait4Set()
{
DWORD tmp = 0;
GetPortVal(0x6c, &tmp, 1);
if (tmp != 2)
Wait4Set();
}
int main(int argc, char* argv[])
{
DWORD temp =0;
if(!InitializeWinIo())
{
printf("fail");
}
Wait4Set();
SetPortVal(0x6c,0x80,1);
Wait4Set();
SetPortVal(0x68,0xE7,1);
Wait4Get();
GetPortVal(0x68,&temp,1);
printf("%s",temp);
ShutdownWinIo();
return 0;
}
页:
[1]