Description: channel: 0-7, a total of 8 channels.
count: the amount of time to be counted.
Return Value: On success, returns NoError().
If the channel is out of range, returns ChannelError
(-15).
Example:
#include “7188xc.h”
void main(void)
{
unsigned long value;
int quit=0;
InitLib();
Print("\n\rTest the CountDownTimer...");
Print("\n\rPress 'q' to quit\n\r");
TimerOpen();
CountDownTimerStart(0,1000); /*use the CountDownTimer*/
while(!quit){
if(Kbhit()&&(Getch()=='q')) quit=1;
CountDownTimerReadValue(0,&value); /*reads the
CountDownTimer*/
Print("Test CountDown=%d\r",value);
if(value==0)
CountDownTimerStart(0,1000); /*restarts the CountDownTimer*/
}
TimerClose();
}
CountDownTimerReadValue()
Function: Reads the current value of the CountDownTimer(count).
Syntax:
int CountDownTimerReadValue(int channel,unsigned
long *value);
Header: #include
”7188xc.h”
Description: If the return value is 0, it means that the time has
expired.
channel: 0-7, a total of 8 channels.
value: a pointer to the location where the value is to be
stored.
Return Value: On success, returns NoError().
If the channel is out of range, returns ChannelError
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) ---
123
Содержание I-7188XC Series
Страница 87: ...I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 87...
Страница 136: ...I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 136...
Страница 142: ...Step 8 Make the project I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 142...
Страница 149: ...Step 8 Rebuild the project I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 149...