and the user manual on the enclosed CD,
which can be found at
CD:\Napdos\minios7\document\lib_manual_for_
7188xabc\index.htm
for more detailed
information.
TimerOpen()
Function: Opens the timer function for use.
Syntax:
int TimerOpen(void);
Header: #include
”7188xc.h”
Description: Before any of the timer functions can be used the
TimerOpen() function must be called.
Return Value: On success, returns NoError. If the Timer is already
open, returns 1.
Example:
#include “7188xc.h”
void main()
{
unsigned long time;
int quit=0;
InitLib();
Print("\n\rPress any key to start the timer");
Print("\n\rthen Press '0' to Reset the timer, ’1’~’4’ to insert a delay, 'q' to
quit\n\r");
Getch();
TimerOpen(); /*open the timer function*/
while(!quit){ /*sets the key function*/
if(Kbhit()){
switch(Getch()){
case '0':
TimerResetValue(); /*reset the timer*/
break;
case '1':
DelayMs(1000); /*delay unit is ms, uses system timeticks. */
break;
case '2':
Delay(1000); /*delay unit is ms, uses the Timer 1 feature of the
CPU. */
break;
case '3':
Delay_1(1000); /*delay unit is 0.1 ms, uses the Timer 1 feature
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) ---
117
Содержание 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...