![]() |
|
|||
File indexing completed on 2025-05-11 08:23:41
0001 /* 0002 * The contents of this file were formerly in console.c which 0003 * had the following copyright notice: 0004 * 0005 * (C) Copyright 1997 0006 * NavIST Group - Real-Time Distributed Systems and Industrial Automation 0007 * http://pandora.ist.utl.pt 0008 * Instituto Superior Tecnico * Lisboa * PORTUGAL 0009 * 0010 * The original code and subsequent modifications are: 0011 * 0012 * COPYRIGHT (c) 1989-2011. 0013 * On-Line Applications Research Corporation (OAR). 0014 * 0015 * The license and distribution terms for this file may be 0016 * found in the file LICENSE in this distribution or at 0017 * http://www.rtems.org/license/LICENSE. 0018 */ 0019 0020 #include <rtems.h> 0021 #include <rtems/keyboard.h> 0022 #include <rtems/mw_uid.h> 0023 0024 /* adds a kbd message to the queue */ 0025 static void kbd_parser( void *ptr, unsigned short keycode, unsigned long mods ) 0026 { 0027 struct MW_UID_MESSAGE m; 0028 struct kbd_struct * kbd = (struct kbd_struct *)ptr; 0029 0030 m.type = MV_UID_KBD; 0031 m.m.kbd.code = keycode; 0032 m.m.kbd.modifiers = kbd->ledflagstate; 0033 m.m.kbd.mode = kbd->kbdmode; 0034 /* printk( "kbd: msg: keycode=%X, mod=%X\n", keycode, mods ); */ 0035 0036 uid_send_message( &m ); 0037 } 0038 0039 void register_kbd_msg_queue( char *q_name, int port ) 0040 { 0041 kbd_set_driver_handler( kbd_parser ); 0042 } 0043 0044 void unregister_kbd_msg_queue( int port ) 0045 { 0046 kbd_set_driver_handler( NULL ); 0047 }
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |