Note:
The
and
printCom
function cannot be used simultaneously
in the same program.
Kbhit()
Function: Checks whether any keyboard input data is currently
available in the input buffer.
Syntax:
int Kbhit(void);
Header: #include ”7188xc.h”
Description: Checks if any data is currently available in the input
buffer.
Return:
0: For no data input.
Other: There is data in the input buffer, and the return
value is the next data in the buffer. If the next data
is “\0”, the function will return -1 (0xFFFF).
Example:
#include “7188xc.h”
void main()
{
int quit=0, data;
InitLib();
Puts("\n\rPress any key to show ASCII ('Q' to quit):\n\r");
while(!quit){
if(Kbhit()){
data=Getch();
if(data=='Q') quit=1;
Putch(data);
Print(" ASCII is: %d\n\r", data);
Puts("\n\rPress any key to show ASCII ('Q' to quit):\n\r");
}
}
}
Getch()
Function: Waits until a character is received from keyboard input.
Syntax:
int Getch(void);
Header: #include ”7188xc.h”
Description: Reads a single character from the input buffer. If there is
no input in the data buffer, the function will wait until the
input buffer receives some data.
Return Value: 0 to 255.
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) ---
98
Summary of Contents for I-7188XC Series
Page 87: ...I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 87...
Page 136: ...I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 136...
Page 142: ...Step 8 Make the project I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 142...
Page 149: ...Step 8 Rebuild the project I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 149...