-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGETKEY.C
More file actions
38 lines (34 loc) · 1.44 KB
/
GETKEY.C
File metadata and controls
38 lines (34 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/***********************************************************************/
/* This file is part of the C51 Compiler package */
/* Copyright KEIL ELEKTRONIK GmbH 1993 - 2002 */
/***********************************************************************/
/* */
/* GETKEY.C: This routine is the general character input of C51. */
/* You may add this file to a uVision2 project. */
/* */
/* To translate this file use C51 with the following invocation: */
/* C51 GETKEY.C <memory model> */
/* */
/* To link the modified GETKEY.OBJ file to your application use the */
/* following Lx51 invocation: */
/* Lx51 <your object file list>, GETKEY.OBJ <controls> */
/* */
/***********************************************************************/
#include <Chipcon/reg1010.h>
#ifdef UART0
char _getkey () {
char c;
while (!RI_0);
c = SBUF0;
RI_0 = 0;
return (c);
}
#else
char _getkey () {
char c;
while (!RI_1);
c = SBUF1;
RI_1 = 0;
return (c);
}
#endif