Changeset 8f16ede6 in mainline
- Timestamp:
- 2019-05-14T18:24:48Z (6 years ago)
- Children:
- e89dc0b
- Parents:
- 3e1bc35
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile
r3e1bc35 r8f16ede6 60 60 done 61 61 62 ifeq ($(CONFIG_RTLD), y) 63 for layout in $(USPACE_PATH)/srv/hid/input/layout/*.so ; do \ 64 mkdir -p "$(DIST_PATH)/lib/layouts/" ; \ 65 cp "$$layout" $(DIST_PATH)/lib/layouts/ ; \ 66 done 67 endif 68 62 69 ifeq ($(CONFIG_DEVEL_FILES), y) 63 70 mkdir -p "$(DIST_PATH)/inc/c/" -
uspace/srv/hid/input/layout.h
r3e1bc35 r8f16ede6 57 57 58 58 extern layout_ops_t layout_default; 59 extern layout_ops_t layout_active; 59 60 60 61 extern layout_t *layout_create(layout_ops_t *); -
uspace/srv/hid/input/layout/Makefile
r3e1bc35 r8f16ede6 6 6 all: 7 7 $(foreach LAYOUT,$(LAYOUTS), $(MAKE) -f Makefile.helper LAYOUT=$(LAYOUT) $@;) 8 8 $(foreach LAYOUT,$(LAYOUTS), cp -p $(LAYOUT).so.0.0 $(LAYOUT).so;) 9 9 10 10 clean: 11 11 $(foreach LAYOUT,$(LAYOUTS), $(MAKE) -f Makefile.helper LAYOUT=$(LAYOUT) $@;) 12 rm *.so 12 13 13 14 fasterclean: 14 15 $(foreach LAYOUT,$(LAYOUTS), $(MAKE) -f Makefile.helper LAYOUT=$(LAYOUT) $@;) 16 rm *.so 15 17 16 18 all-test: -
uspace/srv/hid/input/layout/Makefile.helper
r3e1bc35 r8f16ede6 6 6 SOURCES = $(LAYOUT).c 7 7 8 EXTRA_CFLAGS = -DCONFIG_KB_LAYOUT_EXTERNAL 9 8 10 include $(USPACE_PREFIX)/Makefile.common -
uspace/srv/hid/input/layout/ar.c
r3e1bc35 r8f16ede6 36 36 */ 37 37 38 #if !(defined(CONFIG_KB_LAYOUT_EXTERNAL) || defined(CONFIG_KB_LAYOUT_ar)) 39 #error Invalid configuration of CONFIG_KB_LAYOUT 40 #else 41 38 42 #include <errno.h> 39 43 #include <io/console.h> … … 46 50 static wchar_t ar_parse_ev(layout_t *, kbd_event_t *ev); 47 51 48 #ifdef CONFIG_KB_LAYOUT_ar 49 50 layout_ops_t layout_default = { 52 static const layout_ops_t layout_intern = { 51 53 .create = ar_create, 52 54 .destroy = ar_destroy, … … 54 56 }; 55 57 56 #else 57 58 #ifdef CONFIG_KB_LAYOUT_EXTERNAL 58 59 layout_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 60 layout_ops_t get_layout(void) 61 { 62 return layout_intern; 63 } 64 #else 65 layout_ops_t layout_default = layout_intern; 66 layout_ops_t layout_active = layout_intern; 68 67 #endif 69 68 … … 256 255 } 257 256 257 #endif 258 258 259 /** 259 260 * @} -
uspace/srv/hid/input/layout/cz.c
r3e1bc35 r8f16ede6 35 35 */ 36 36 37 #if !(defined(CONFIG_KB_LAYOUT_EXTERNAL) || defined(CONFIG_KB_LAYOUT_cz)) 38 #error Invalid configuration of CONFIG_KB_LAYOUT 39 #else 40 37 41 #include <errno.h> 38 42 #include <io/console.h> … … 47 51 static wchar_t cz_parse_ev(layout_t *, kbd_event_t *ev); 48 52 53 static const layout_ops_t layout_intern = { 54 .create = cz_create, 55 .destroy = cz_destroy, 56 .parse_ev = cz_parse_ev 57 }; 58 59 #ifdef CONFIG_KB_LAYOUT_EXTERNAL 60 layout_ops_t get_layout(void); 61 layout_ops_t get_layout(void) 62 { 63 return layout_intern; 64 } 65 #else 66 layout_ops_t layout_default = layout_intern; 67 layout_ops_t layout_active = layout_intern; 68 #endif 69 49 70 enum m_state { 50 71 ms_start, … … 56 77 enum m_state mstate; 57 78 } layout_cz_t; 58 59 #ifdef CONFIG_KB_LAYOUT_cz60 61 layout_ops_t layout_default = {62 .create = cz_create,63 .destroy = cz_destroy,64 .parse_ev = cz_parse_ev65 };66 67 #else68 69 layout_ops_t get_layout(void);70 layout_ops_t get_layout(void) {71 layout_ops_t layout_default = {72 .create = cz_create,73 .destroy = cz_destroy,74 .parse_ev = cz_parse_ev75 };76 return layout_default;77 }78 79 #endif80 79 81 80 static wchar_t map_lcase[] = { … … 447 446 } 448 447 448 #endif 449 449 450 /** 450 451 * @} -
uspace/srv/hid/input/layout/us_dvorak.c
r3e1bc35 r8f16ede6 35 35 */ 36 36 37 #if !(defined(CONFIG_KB_LAYOUT_EXTERNAL) || defined(CONFIG_KB_LAYOUT_us_dvorak)) 38 #error Invalid configuration of CONFIG_KB_LAYOUT 39 #else 40 37 41 #include <errno.h> 38 42 #include <io/console.h> … … 45 49 static wchar_t us_dvorak_parse_ev(layout_t *, kbd_event_t *ev); 46 50 47 #ifdef CONFIG_KB_LAYOUT_us_dvorak 48 49 layout_ops_t layout_default = { 51 static const layout_ops_t layout_intern = { 50 52 .create = us_dvorak_create, 51 53 .destroy = us_dvorak_destroy, … … 53 55 }; 54 56 55 #else 56 57 #ifdef CONFIG_KB_LAYOUT_EXTERNAL 57 58 layout_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 59 layout_ops_t get_layout(void) 60 { 61 return layout_intern; 62 } 63 #else 64 layout_ops_t layout_default = layout_intern; 65 layout_ops_t layout_active = layout_intern; 67 66 #endif 68 67 … … 273 272 } 274 273 274 #endif 275 275 276 /** 276 277 * @} -
uspace/srv/hid/input/layout/us_qwerty.c
r3e1bc35 r8f16ede6 35 35 */ 36 36 37 #if !(defined(CONFIG_KB_LAYOUT_EXTERNAL) || defined(CONFIG_KB_LAYOUT_us_qwerty)) 38 #error Invalid configuration of CONFIG_KB_LAYOUT 39 #else 40 37 41 #include <errno.h> 38 42 #include <io/console.h> … … 45 49 static wchar_t us_qwerty_parse_ev(layout_t *, kbd_event_t *ev); 46 50 47 #ifdef CONFIG_KB_LAYOUT_us_qwerty 48 49 layout_ops_t layout_default = { 51 static const layout_ops_t layout_intern = { 50 52 .create = us_qwerty_create, 51 53 .destroy = us_qwerty_destroy, … … 53 55 }; 54 56 55 #else 56 57 #ifdef CONFIG_KB_LAYOUT_EXTERNAL 57 58 layout_ops_t get_layout(void); 58 layout_ops_t get_layout(void) { 59 layout_ops_t layout_default = { 60 .create = us_qwerty_create, 61 .destroy = us_qwerty_destroy, 62 .parse_ev = us_qwerty_parse_ev 63 }; 64 return layout_default; 65 } 66 59 layout_ops_t get_layout(void) 60 { 61 return layout_intern; 62 } 63 #else 64 layout_ops_t layout_default = layout_intern; 65 layout_ops_t layout_active = layout_intern; 67 66 #endif 68 67 … … 267 266 } 268 267 268 #endif 269 269 270 /** 270 271 * @}
Note:
See TracChangeset
for help on using the changeset viewer.