Changeset 75a2dc08 in mainline
- Timestamp:
- 2009-08-13T17:08:39Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fd210de
- Parents:
- 24f27bb (diff), b39fd4c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace
- Files:
-
- 1 added
- 21 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/console/Makefile
r24f27bb r75a2dc08 35 35 include $(LIBC_PREFIX)/Makefile.toolchain 36 36 37 CFLAGS += -I. -I../kbd/include -I../fb37 CFLAGS += -I. 38 38 39 39 LIBS = $(LIBC_PREFIX)/libc.a … … 47 47 console.c \ 48 48 screenbuffer.c \ 49 ../kbd/generic/keybuffer.c \49 keybuffer.c \ 50 50 gcons.c 51 51 -
uspace/srv/console/console.c
r24f27bb r75a2dc08 34 34 35 35 #include <libc.h> 36 #include <fb.h>37 36 #include <ipc/ipc.h> 38 #include < kbd.h>37 #include <ipc/kbd.h> 39 38 #include <io/keycode.h> 40 39 #include <ipc/fb.h> -
uspace/srv/kbd/Makefile
r24f27bb r75a2dc08 46 46 generic/kbd.c \ 47 47 genarch/gsp.c \ 48 genarch/stroke.c \ 49 generic/keybuffer.c 48 genarch/stroke.c 50 49 51 50 ARCH_SOURCES = -
uspace/srv/kbd/ctl/gxe_fb.c
r24f27bb r75a2dc08 225 225 } 226 226 227 void kbd_ctl_set_ind(unsigned mods) 228 { 229 (void) mods; 230 } 231 227 232 /** 228 233 * @} -
uspace/srv/kbd/ctl/pc.c
r24f27bb r75a2dc08 40 40 #include <io/keycode.h> 41 41 #include <kbd_ctl.h> 42 #include <kbd_port.h> 42 43 #include <gsp.h> 43 44 … … 45 46 ds_s, 46 47 ds_e 48 }; 49 50 enum special_code { 51 SC_ACK = 0xfa, 52 SC_NAK = 0xfe 53 }; 54 55 enum lock_ind_bits { 56 LI_SCROLL = 0x01, 57 LI_NUM = 0x02, 58 LI_CAPS = 0x04 59 }; 60 61 enum kbd_command { 62 KBD_CMD_SET_LEDS = 0xed 47 63 }; 48 64 … … 194 210 size_t map_length; 195 211 212 /* 213 * ACK/NAK are returned as response to us sending a command. 214 * We are not interested in them. 215 */ 216 if (scancode == SC_ACK || scancode == SC_NAK) 217 return; 218 196 219 if (scancode == 0xe0) { 197 220 ds = ds_e; … … 230 253 } 231 254 255 void kbd_ctl_set_ind(unsigned mods) 256 { 257 uint8_t b; 258 259 b = 0; 260 if ((mods & KM_CAPS_LOCK) != 0) 261 b = b | LI_CAPS; 262 if ((mods & KM_NUM_LOCK) != 0) 263 b = b | LI_NUM; 264 if ((mods & KM_SCROLL_LOCK) != 0) 265 b = b | LI_SCROLL; 266 267 kbd_port_write(KBD_CMD_SET_LEDS); 268 kbd_port_write(b); 269 } 270 232 271 /** 233 272 * @} -
uspace/srv/kbd/ctl/pl050.c
r24f27bb r75a2dc08 258 258 } 259 259 260 void kbd_ctl_set_ind(unsigned mods) 261 { 262 (void) mods; 263 } 264 260 265 /** 261 266 * @} -
uspace/srv/kbd/ctl/stty.c
r24f27bb r75a2dc08 224 224 } 225 225 226 void kbd_ctl_set_ind(unsigned mods) 227 { 228 (void) mods; 229 } 230 226 231 /** 227 232 * @} -
uspace/srv/kbd/ctl/sun.c
r24f27bb r75a2dc08 72 72 if (key != 0) 73 73 kbd_push_ev(type, key); 74 } 75 76 void kbd_ctl_set_ind(unsigned mods) 77 { 78 (void) mods; 74 79 } 75 80 -
uspace/srv/kbd/generic/kbd.c
r24f27bb r75a2dc08 38 38 #include <ipc/ipc.h> 39 39 #include <ipc/services.h> 40 #include <ipc/kbd.h> 40 41 #include <sysinfo.h> 41 42 #include <stdio.h> … … 51 52 52 53 #include <kbd.h> 53 #include <keybuffer.h>54 54 #include <kbd_port.h> 55 55 #include <kbd_ctl.h> … … 60 60 int cons_connected = 0; 61 61 int phone2cons = -1; 62 keybuffer_t keybuffer;63 62 64 63 /** Currently active modifiers. */ … … 125 124 mods = mods ^ (mod_mask & ~lock_keys); 126 125 lock_keys = lock_keys | mod_mask; 126 127 /* Update keyboard lock indicator lights. */ 128 kbd_ctl_set_ind(mods); 127 129 } else { 128 130 lock_keys = lock_keys & ~mod_mask; … … 239 241 layout[active_layout]->reset(); 240 242 241 /* Initialize key buffer */242 keybuffer_init(&keybuffer);243 244 243 async_set_client_connection(console_connection); 245 244 -
uspace/srv/kbd/include/kbd.h
r24f27bb r75a2dc08 38 38 #define KBD_KBD_H_ 39 39 40 #include <keybuffer.h>41 #include <ipc/ipc.h>42 43 #define KBD_EVENT 102444 #define KBD_MS_LEFT 102545 #define KBD_MS_RIGHT 102646 #define KBD_MS_MIDDLE 102747 #define KBD_MS_MOVE 102848 49 typedef enum {50 KBD_YIELD = IPC_FIRST_USER_METHOD,51 KBD_RECLAIM52 } kbd_request_t;53 54 40 extern int cir_service; 55 41 extern int cir_phone; -
uspace/srv/kbd/include/kbd_ctl.h
r24f27bb r75a2dc08 40 40 extern void kbd_ctl_parse_scancode(int); 41 41 extern int kbd_ctl_init(void); 42 42 extern void kbd_ctl_set_ind(unsigned); 43 43 44 44 #endif -
uspace/srv/kbd/include/kbd_port.h
r24f27bb r75a2dc08 38 38 #define KBD_PORT_H_ 39 39 40 #include <sys/types.h> 41 40 42 extern int kbd_port_init(void); 41 43 extern void kbd_port_yield(void); 42 44 extern void kbd_port_reclaim(void); 45 extern void kbd_port_write(uint8_t); 43 46 44 47 #endif -
uspace/srv/kbd/port/dummy.c
r24f27bb r75a2dc08 51 51 } 52 52 53 void kbd_port_write(uint8_t data) 54 { 55 (void) data; 56 } 57 53 58 /** @} 54 59 */ -
uspace/srv/kbd/port/gxemul.c
r24f27bb r75a2dc08 78 78 } 79 79 80 void kbd_port_write(uint8_t data) 81 { 82 (void) data; 83 } 84 80 85 /** Process data sent when a key is pressed. 81 86 * -
uspace/srv/kbd/port/i8042.c
r24f27bb r75a2dc08 160 160 } 161 161 162 void kbd_port_write(uint8_t data) 163 { 164 pio_write_8(&i8042->data, data); 165 wait_ready(); 166 } 167 162 168 static void i8042_irq_handler(ipc_callid_t iid, ipc_call_t *call) 163 169 { -
uspace/srv/kbd/port/msim.c
r24f27bb r75a2dc08 78 78 } 79 79 80 void kbd_port_write(uint8_t data) 81 { 82 (void) data; 83 } 84 80 85 static void msim_irq_handler(ipc_callid_t iid, ipc_call_t *call) 81 86 { -
uspace/srv/kbd/port/pl050.c
r24f27bb r75a2dc08 102 102 } 103 103 104 void kbd_port_write(uint8_t data) 105 { 106 (void) data; 107 } 108 104 109 static void pl050_irq_handler(ipc_callid_t iid, ipc_call_t *call) 105 110 { -
uspace/srv/kbd/port/sgcn.c
r24f27bb r75a2dc08 133 133 } 134 134 135 void kbd_port_write(uint8_t data) 136 { 137 (void) data; 138 } 139 135 140 /** 136 141 * Handler of the "key pressed" event. Reads codes of all the pressed keys from -
uspace/srv/kbd/port/ski.c
r24f27bb r75a2dc08 78 78 } 79 79 80 void kbd_port_write(uint8_t data) 81 { 82 (void) data; 83 } 84 80 85 /** Thread to poll Ski for keypresses. */ 81 86 static void *ski_thread_impl(void *arg) -
uspace/srv/kbd/port/sun.c
r24f27bb r75a2dc08 71 71 } 72 72 73 void kbd_port_write(uint8_t data) 74 { 75 (void) data; 76 } 77 73 78 /** @} 74 79 */ -
uspace/srv/pci/serial.c
r24f27bb r75a2dc08 120 120 pio_write_8(port + 3, 0x07); // 8 bits, no parity, two stop bits 121 121 pio_write_8(port + 2, 0xC7); // Enable FIFO, clear them, with 14-byte threshold 122 pio_write_8(port + 4, 0x0B); // IRQs enabled, RTS/DSR set122 pio_write_8(port + 4, 0x0B); // RTS/DSR set (Request to Send and Data Terminal Ready lines enabled), Aux Output2 set 123 123 } 124 124
Note:
See TracChangeset
for help on using the changeset viewer.