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/us_dvorak.c

    r3e1bc35 r8f16ede6  
    3535 */
    3636
     37#if !(defined(CONFIG_KB_LAYOUT_EXTERNAL) || defined(CONFIG_KB_LAYOUT_us_dvorak))
     38#error Invalid configuration of CONFIG_KB_LAYOUT
     39#else
     40
    3741#include <errno.h>
    3842#include <io/console.h>
     
    4549static wchar_t us_dvorak_parse_ev(layout_t *, kbd_event_t *ev);
    4650
    47 #ifdef CONFIG_KB_LAYOUT_us_dvorak
    48 
    49 layout_ops_t layout_default = {
     51static const layout_ops_t layout_intern = {
    5052        .create = us_dvorak_create,
    5153        .destroy = us_dvorak_destroy,
     
    5355};
    5456
    55 #else
    56 
     57#ifdef CONFIG_KB_LAYOUT_EXTERNAL
    5758layout_ops_t get_layout(void);
    58 layout_ops_t get_layout(void) {
    59         layout_ops_t layout_default = {
    60                 .create = us_dvorak_create,
    61                 .destroy = us_dvorak_destroy,
    62                 .parse_ev = us_dvorak_parse_ev
    63         };
    64         return layout_default;
    65 }
    66 
     59layout_ops_t get_layout(void)
     60{
     61        return layout_intern;
     62}
     63#else
     64layout_ops_t layout_default = layout_intern;
     65layout_ops_t layout_active = layout_intern;
    6766#endif
    6867
     
    273272}
    274273
     274#endif
     275
    275276/**
    276277 * @}
Note: See TracChangeset for help on using the changeset viewer.