1 use crate::wrapper_winring0
;
3 const OLS_TYPE
: u32 = 40000;
5 const F17H_M01H_THM_TCON_CUR_TMP
: u32 = 0x00059800;
6 const F17H_TEMP_OFFSET_FLAG
: u32 = 0x80000;
7 const FAMILY_17H_PCI_CONTROL_REGISTER
: u32 = 0x60;
11 wrapper_winring0
::WritePciConfigDwordEx(
13 FAMILY_17H_PCI_CONTROL_REGISTER
,
14 F17H_M01H_THM_TCON_CUR_TMP
,
17 let output
: &mut u32 = &mut 0;
18 let ok
= wrapper_winring0
::ReadPciConfigDwordEx(
20 FAMILY_17H_PCI_CONTROL_REGISTER
+ 4,
23 let offset_flag
= *output
& F17H_TEMP_OFFSET_FLAG
!= 0;
24 let mut temperature
= ((*output
>> 21) * 125) as f32 * 0.001;