Changeset ad7a6c9 in mainline for uspace/srv/hid/kbd/generic/kbd.c


Ignore:
Timestamp:
2011-03-30T13:10:24Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4ae90f9
Parents:
6e50466 (diff), d6b81941 (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.
Message:

Merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/kbd/generic/kbd.c

    r6e50466 rad7a6c9  
    3636 */
    3737
    38 #include <ipc/ipc.h>
    3938#include <ipc/services.h>
    4039#include <ipc/kbd.h>
     
    6867static unsigned lock_keys;
    6968
    70 int cir_service = 0;
    71 int cir_phone = -1;
     69bool irc_service = false;
     70int irc_phone = -1;
    7271
    7372#define NUM_LAYOUTS 3
     
    173172        int retval;
    174173
    175         ipc_answer_0(iid, EOK);
     174        async_answer_0(iid, EOK);
    176175
    177176        while (1) {
     
    180179                case IPC_M_PHONE_HUNGUP:
    181180                        if (client_phone != -1) {
    182                                 ipc_hangup(client_phone);
     181                                async_hangup(client_phone);
    183182                                client_phone = -1;
    184183                        }
    185184                       
    186                         ipc_answer_0(callid, EOK);
     185                        async_answer_0(callid, EOK);
    187186                        return;
    188187                case IPC_M_CONNECT_TO_ME:
     
    205204                        retval = EINVAL;
    206205                }
    207                 ipc_answer_0(callid, retval);
     206                async_answer_0(callid, retval);
    208207        }       
    209208}
     
    217216        sysarg_t obio;
    218217       
    219         if ((sysinfo_get_value("kbd.cir.fhc", &fhc) == EOK) && (fhc))
    220                 cir_service = SERVICE_FHC;
    221         else if ((sysinfo_get_value("kbd.cir.obio", &obio) == EOK) && (obio))
    222                 cir_service = SERVICE_OBIO;
    223        
    224         if (cir_service) {
    225                 while (cir_phone < 0) {
    226                         cir_phone = ipc_connect_me_to_blocking(PHONE_NS, cir_service,
    227                             0, 0);
    228                 }
     218        if (((sysinfo_get_value("kbd.cir.fhc", &fhc) == EOK) && (fhc))
     219            || ((sysinfo_get_value("kbd.cir.obio", &obio) == EOK) && (obio)))
     220                irc_service = true;
     221       
     222        if (irc_service) {
     223                while (irc_phone < 0)
     224                        irc_phone = service_connect_blocking(SERVICE_IRC, 0, 0);
    229225        }
    230226       
Note: See TracChangeset for help on using the changeset viewer.