Changeset 8f16ede6 in mainline for uspace/srv/hid/input/layout/ar.c


Ignore:
Timestamp:
2019-05-14T18:24:48Z (5 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
e89dc0b
Parents:
3e1bc35
Message:

Turning old layouts into dynamic libraries

Adds new makefiles which creates dynamic
libraries for every layout. Extends existing
makefile for exposing those layout in the
distributed image

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/input/layout/ar.c

    r3e1bc35 r8f16ede6  
    3636 */
    3737
     38#if !(defined(CONFIG_KB_LAYOUT_EXTERNAL) || defined(CONFIG_KB_LAYOUT_ar))
     39#error Invalid configuration of CONFIG_KB_LAYOUT
     40#else
     41
    3842#include <errno.h>
    3943#include <io/console.h>
     
    4650static wchar_t ar_parse_ev(layout_t *, kbd_event_t *ev);
    4751
    48 #ifdef CONFIG_KB_LAYOUT_ar
    49 
    50 layout_ops_t layout_default = {
     52static const layout_ops_t layout_intern = {
    5153        .create = ar_create,
    5254        .destroy = ar_destroy,
     
    5456};
    5557
    56 #else
    57 
     58#ifdef CONFIG_KB_LAYOUT_EXTERNAL
    5859layout_ops_t get_layout(void);
    59 layout_ops_t get_layout(void) {
    60         layout_ops_t layout_default = {
    61                 .create = ar_create,
    62                 .destroy = ar_destroy,
    63                 .parse_ev = ar_parse_ev
    64         };
    65         return layout_default;
    66 }
    67 
     60layout_ops_t get_layout(void)
     61{
     62        return layout_intern;
     63}
     64#else
     65layout_ops_t layout_default = layout_intern;
     66layout_ops_t layout_active = layout_intern;
    6867#endif
    6968
     
    256255}
    257256
     257#endif
     258
    258259/**
    259260 * @}
Note: See TracChangeset for help on using the changeset viewer.