Home |
RTTarget-32 Programming Manual System Management BIOS (SMBIOS) Advanced Programmable Interrupt Controller (APIC) Function RTMPBusFromCPUClock Function RTMPTablePCIInterrupt |
Function RTMPBusFromCPUClockRTMPBusFromCPUClock measures the external bus clock of the CPU using the internal CPU clock: UINT RTMPBusFromCPUClock(UINT CPUClockMhz, UINT MeasureClocks); ParametersCPUClockMhzThe CPU's internal clock in MHz. Systems with an System Management BIOS can use function RTSMBIOSGetCPUSpeed to query this value. MeasureClocksNumber of CPU clock cycles to use for the measurement. Larger values improve the accuracy, but take more time. A value such as 40000000 (about 1/100th of a second on a 4GHz CPU) should return results with less than 1% error. return valueThe measured bus clock or 0 on failure. The function requires APIC mode and will call RTMPSetAPICMode(0) if in PIC mode. It reprograms the APIC timer, so the APIC timer on the local CPU should not be in use through RTMPInitAPICTimer.
|