
PIO-D64/PIO-
D64U User’s Manual ( Ver.1.
6, Mar. 2015, PMH-007-16 ) ----- 48
5.7 COUNTER FUNCTION
5.7.1 PIOD64_SetCounter
Description :
This subroutine is used to set the 8254 counter's mode and value.
Syntax :
void PIOD64_SetCounter(DWORD dwBase, WORD wCounterNo,
WORD bCounterMode, DWORD wCounterValue);
Parameter :
dwBase
: [
Input
] I/O port addresses, please refer to
function PIODIO_GetConfigAddressSpace.
Only the low WORD is valid.
wCounterNo : [
Input
] The 8254 Counter-Number: 0 to 5.
(0 to 2: Chip-0, 3 to 5: Chip-1)
wCounterMode : [
Input
] The 8254 Counter-Mode: 0 to 5.
wCounterValue : [
Input
] The 16 bits value for the counter to
count. Only the lower WORD is valid.
Return:
None
5.7.2 PIOD64_ReadCounter
Description :
This subroutine is used to obtain the 8254 counter's value.
Syntax :
DWORD PIOD64_ReadCounter (DWORD dwBase, WORD
wCounterNo, WORD bCounterMode);
Parameter :
dwBase
: [
Input
] I/O port addresses, please refer to function
PIODIO_GetConfigAddressSpace.
Only the low WORD is valid.
wCounterNo : [
Input
] The 8254 Counter-Number: 0 to 5.
(0 to 2: Chip-0, 3 to 5: Chip-1)
wCounterMode: [
Input
]The 8254 Counter-Mode: 0 to 5.
Return:
16 bits counter's value. (Only the lower WORD is valid.)
ГК
Атлант
Инжиниринг
–
официальный
представитель
в
РФ
и
СНГ
+7(495)109-02-08 [email protected] www.bbrc.ru