Changes in / [75a2dc08:24f27bb] in mainline


Ignore:
Location:
uspace
Files:
2 added
3 deleted
21 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/console/Makefile

    r75a2dc08 r24f27bb  
    3535include $(LIBC_PREFIX)/Makefile.toolchain
    3636
    37 CFLAGS += -I.
     37CFLAGS += -I. -I../kbd/include -I../fb
    3838
    3939LIBS = $(LIBC_PREFIX)/libc.a
     
    4747        console.c \
    4848        screenbuffer.c \
    49         keybuffer.c \
     49        ../kbd/generic/keybuffer.c \
    5050        gcons.c
    5151
  • uspace/srv/console/console.c

    r75a2dc08 r24f27bb  
    3434
    3535#include <libc.h>
     36#include <fb.h>
    3637#include <ipc/ipc.h>
    37 #include <ipc/kbd.h>
     38#include <kbd.h>
    3839#include <io/keycode.h>
    3940#include <ipc/fb.h>
  • uspace/srv/kbd/Makefile

    r75a2dc08 r24f27bb  
    4646        generic/kbd.c \
    4747        genarch/gsp.c \
    48         genarch/stroke.c
     48        genarch/stroke.c \
     49        generic/keybuffer.c
    4950
    5051ARCH_SOURCES =
  • uspace/srv/kbd/ctl/gxe_fb.c

    r75a2dc08 r24f27bb  
    225225}
    226226
    227 void kbd_ctl_set_ind(unsigned mods)
    228 {
    229         (void) mods;
    230 }
    231 
    232227/**
    233228 * @}
  • uspace/srv/kbd/ctl/pc.c

    r75a2dc08 r24f27bb  
    4040#include <io/keycode.h>
    4141#include <kbd_ctl.h>
    42 #include <kbd_port.h>
    4342#include <gsp.h>
    4443
     
    4645        ds_s,
    4746        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
    6347};
    6448
     
    210194        size_t map_length;
    211195
    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 
    219196        if (scancode == 0xe0) {
    220197                ds = ds_e;
     
    253230}
    254231
    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 
    271232/**
    272233 * @}
  • uspace/srv/kbd/ctl/pl050.c

    r75a2dc08 r24f27bb  
    258258}
    259259
    260 void kbd_ctl_set_ind(unsigned mods)
    261 {
    262         (void) mods;
    263 }
    264 
    265260/**
    266261 * @}
  • uspace/srv/kbd/ctl/stty.c

    r75a2dc08 r24f27bb  
    224224}
    225225
    226 void kbd_ctl_set_ind(unsigned mods)
    227 {
    228         (void) mods;
    229 }
    230 
    231226/**
    232227 * @}
  • uspace/srv/kbd/ctl/sun.c

    r75a2dc08 r24f27bb  
    7272        if (key != 0)
    7373                kbd_push_ev(type, key);
    74 }
    75 
    76 void kbd_ctl_set_ind(unsigned mods)
    77 {
    78         (void) mods;
    7974}
    8075
  • uspace/srv/kbd/generic/kbd.c

    r75a2dc08 r24f27bb  
    3838#include <ipc/ipc.h>
    3939#include <ipc/services.h>
    40 #include <ipc/kbd.h>
    4140#include <sysinfo.h>
    4241#include <stdio.h>
     
    5251
    5352#include <kbd.h>
     53#include <keybuffer.h>
    5454#include <kbd_port.h>
    5555#include <kbd_ctl.h>
     
    6060int cons_connected = 0;
    6161int phone2cons = -1;
     62keybuffer_t keybuffer;
    6263
    6364/** Currently active modifiers. */
     
    124125                        mods = mods ^ (mod_mask & ~lock_keys);
    125126                        lock_keys = lock_keys | mod_mask;
    126 
    127                         /* Update keyboard lock indicator lights. */
    128                         kbd_ctl_set_ind(mods);
    129127                } else {
    130128                        lock_keys = lock_keys & ~mod_mask;
     
    241239        layout[active_layout]->reset();
    242240       
     241        /* Initialize key buffer */
     242        keybuffer_init(&keybuffer);
     243       
    243244        async_set_client_connection(console_connection);
    244245
  • uspace/srv/kbd/include/kbd.h

    r75a2dc08 r24f27bb  
    3838#define KBD_KBD_H_
    3939
     40#include <keybuffer.h>
     41#include <ipc/ipc.h>
     42
     43#define KBD_EVENT      1024
     44#define KBD_MS_LEFT    1025
     45#define KBD_MS_RIGHT   1026
     46#define KBD_MS_MIDDLE  1027
     47#define KBD_MS_MOVE    1028
     48
     49typedef enum {
     50        KBD_YIELD = IPC_FIRST_USER_METHOD,
     51        KBD_RECLAIM
     52} kbd_request_t;
     53
    4054extern int cir_service;
    4155extern int cir_phone;
  • uspace/srv/kbd/include/kbd_ctl.h

    r75a2dc08 r24f27bb  
    4040extern void kbd_ctl_parse_scancode(int);
    4141extern int kbd_ctl_init(void);
    42 extern void kbd_ctl_set_ind(unsigned);
     42
    4343
    4444#endif
  • uspace/srv/kbd/include/kbd_port.h

    r75a2dc08 r24f27bb  
    3838#define KBD_PORT_H_
    3939
    40 #include <sys/types.h>
    41 
    4240extern int kbd_port_init(void);
    4341extern void kbd_port_yield(void);
    4442extern void kbd_port_reclaim(void);
    45 extern void kbd_port_write(uint8_t);
    4643
    4744#endif
  • uspace/srv/kbd/port/dummy.c

    r75a2dc08 r24f27bb  
    5151}
    5252
    53 void kbd_port_write(uint8_t data)
    54 {
    55         (void) data;
    56 }
    57 
    5853/** @}
    5954*/
  • uspace/srv/kbd/port/gxemul.c

    r75a2dc08 r24f27bb  
    7878}
    7979
    80 void kbd_port_write(uint8_t data)
    81 {
    82         (void) data;
    83 }
    84 
    8580/** Process data sent when a key is pressed.
    8681 * 
  • uspace/srv/kbd/port/i8042.c

    r75a2dc08 r24f27bb  
    160160}
    161161
    162 void kbd_port_write(uint8_t data)
    163 {
    164         pio_write_8(&i8042->data, data);
    165         wait_ready();
    166 }
    167 
    168162static void i8042_irq_handler(ipc_callid_t iid, ipc_call_t *call)
    169163{
  • uspace/srv/kbd/port/msim.c

    r75a2dc08 r24f27bb  
    7878}
    7979
    80 void kbd_port_write(uint8_t data)
    81 {
    82         (void) data;
    83 }
    84 
    8580static void msim_irq_handler(ipc_callid_t iid, ipc_call_t *call)
    8681{
  • uspace/srv/kbd/port/pl050.c

    r75a2dc08 r24f27bb  
    102102}
    103103
    104 void kbd_port_write(uint8_t data)
    105 {
    106         (void) data;
    107 }
    108 
    109104static void pl050_irq_handler(ipc_callid_t iid, ipc_call_t *call)
    110105{
  • uspace/srv/kbd/port/sgcn.c

    r75a2dc08 r24f27bb  
    133133}
    134134
    135 void kbd_port_write(uint8_t data)
    136 {
    137         (void) data;
    138 }
    139 
    140135/**
    141136 * Handler of the "key pressed" event. Reads codes of all the pressed keys from
  • uspace/srv/kbd/port/ski.c

    r75a2dc08 r24f27bb  
    7878}
    7979
    80 void kbd_port_write(uint8_t data)
    81 {
    82         (void) data;
    83 }
    84 
    8580/** Thread to poll Ski for keypresses. */
    8681static void *ski_thread_impl(void *arg)
  • uspace/srv/kbd/port/sun.c

    r75a2dc08 r24f27bb  
    7171}
    7272
    73 void kbd_port_write(uint8_t data)
    74 {
    75         (void) data;
    76 }
    77 
    7873/** @}
    7974*/
  • uspace/srv/pci/serial.c

    r75a2dc08 r24f27bb  
    120120        pio_write_8(port + 3, 0x07);    // 8 bits, no parity, two stop bits
    121121        pio_write_8(port + 2, 0xC7);    // Enable FIFO, clear them, with 14-byte threshold
    122         pio_write_8(port + 4, 0x0B);    // RTS/DSR set (Request to Send and Data Terminal Ready lines enabled), Aux Output2 set
     122        pio_write_8(port + 4, 0x0B);    // IRQs enabled, RTS/DSR set
    123123}
    124124
Note: See TracChangeset for help on using the changeset viewer.