I-7188XA Series User’s Manual ( Ver1.2, Feb/2014, 7MH-019-10 ) ---
102
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 ”7188xa.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 <7188xa.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 ”7188xa.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.
Summary of Contents for I-7188XA
Page 62: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 62 5 6 COM1 RS 232 1 2 232...
Page 90: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 90 1 2...
Page 140: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 140...
Page 146: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 146 Step 8 Make the project...
Page 153: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 153 Step 8 Rebuild the project...
Page 158: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 158...
Page 162: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 162...
Page 164: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 164...