Abl-electronic PIC Microcontrollers PIC16 Manual de usuario Pagina 246

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 312
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 245
mikroC
- C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
238
MikroElektronika:
Development
tools
-
Books
-
Compilers
page
Prototype
char Ps2_Key_Read(char *value, char *special, char *pressed);
Returns Returns 1 if reading of a key from the keyboard was successful, otherwise 0.
Description The function retrieves information about key pressed.
Parameter
value holds the value of the key pressed. For characters, numerals, punctua-
tion marks, and space, value will store the appropriate ASCII value. Routine “recog-
nizes” the function of Shift and Caps Lock, and behaves appropriately.
Parameter
special is a flag for special function keys (F1, Enter, Esc, etc). If key
pressed is one of these, special will be set to 1, otherwise 0.
Parameter
pressed is set to 1 if the key is pressed, and 0 if released.
Requires PS/2 keyboard needs to be initialized; see Ps2_Init or Ps2_Config.
Example
// Press Enter to continue:
do {
if (Ps2_Key_Read(&value, &special, &pressed)) {
if ((value == 13) && (special == 1)) break;
}
} while (1);
Ps2_Key_Read
Vista de pagina 245
1 2 ... 241 242 243 244 245 246 247 248 249 250 251 ... 311 312

Comentarios a estos manuales

Sin comentarios