outbyte (CONTROL_STATUS, MODE_STOP);
dElapsedTime = (UINT32) inbyte (TIMER_BYTE_0);
dElapsedTime |= ((UINT32) inbyte (TIMER_BYTE_1)) << 8;
dElapsedTime |= ((UINT32) inbyte (TIMER_BYTE_2)) << 16;
dElapsedTime |= ((UINT32) inbyte (TIMER_BYTE_3)) << 24;
printf ("Elapsed time = %u.%06u seconds\n",
dElapsedTime / 1000000U, dElapsedTime % 1000000U);
The
TIMER_BYTE_0, TIMER_BYTE_1, TIMER_BYTE_2
and
TIMER_BYTE_3
control
registers are at successive addresses and form a 32-bit register in “little endian” format. It is
possible to read and write the timer’s value in a single 32-bit I/O operation. For example, to read
the timer’s value, the following C statement suffices.
DCounterValue = inlong (TIMER_BYTE_0);
VP 110/01x
8-19
Additional Local I/O Functions
Содержание VP 110/01 Series
Страница 18: ...This page has been left intentionally blank 1 6 VP 110 01x Introduction and Overview ...
Страница 60: ...This page has been left intentionally blank 7 6 VP 110 01x Memory ...
Страница 88: ...This page has been left intentionally blank 9 8 VP 110 01x PC BIOS ...
Страница 122: ...This page has been left intentionally blank 11 28 VP 110 01x VSA Mode Diagnostics ...
Страница 150: ...This page has been left intentionally blank B 8 VP 110 01x Breakout Modules ...