Changeset 312e5ff in mainline
- Timestamp:
- 2014-08-29T20:28:55Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 75751db6
- Parents:
- 293703e
- Files:
-
- 6 added
- 2 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/arm32/Makefile.inc
r293703e r312e5ff 60 60 61 61 ifeq ($(MACHINE), gta02) 62 RD_SRVS_ESSENTIAL += \ 63 $(USPACE_PATH)/srv/hid/s3c24xx_ts/s3c24xx_ts \ 64 $(USPACE_PATH)/srv/hw/char/s3c24xx_uart/s3c24ser 62 RD_SRVS_ESSENTIAL += \ 63 $(USPACE_PATH)/srv/hid/s3c24xx_ts/s3c24xx_ts \ 64 $(USPACE_PATH)/srv/hw/char/s3c24xx_uart/s3c24ser 65 endif 66 67 ifeq ($(MACHINE), $(filter $(MACHINE),beagleboardxm beaglebone)) 68 RD_DRVS_ESSENTIAL += \ 69 platform/amdm37x \ 70 fb/amdm37x_dispc 71 endif 72 73 ifeq ($(MACHINE), integratorcp) 74 RD_DRVS_ESSENTIAL += \ 75 char/pl050 \ 76 char/xtkbd \ 77 platform/icp 65 78 endif 66 79 67 80 RD_DRVS_ESSENTIAL += \ 68 platform/amdm37x \69 fb/amdm37x_dispc \70 81 bus/usb/ehci \ 71 82 bus/usb/ohci \ -
uspace/Makefile
r293703e r312e5ff 136 136 drv/block/ata_bd \ 137 137 drv/char/i8042 \ 138 drv/char/pl050 \ 138 139 drv/char/ps2mouse \ 139 140 drv/char/xtkbd \ … … 155 156 drv/nic/e1k \ 156 157 drv/nic/rtl8139 \ 157 drv/nic/rtl8169 158 drv/nic/rtl8169 \ 159 drv/platform/icp 158 160 159 161 ## Platform-specific hardware support -
uspace/drv/char/xtkbd/xtkbd.c
r293703e r312e5ff 199 199 * @param dev DDF device structure. 200 200 * 201 * Connects to parent, creates mousefunction, starts polling fibril.201 * Connects to parent, creates keyboard function, starts polling fibril. 202 202 */ 203 203 int xt_kbd_init(xt_kbd_t *kbd, ddf_dev_t *dev) … … 207 207 kbd->client_sess = NULL; 208 208 kbd->parent_sess = ddf_dev_parent_sess_create(dev, EXCHANGE_SERIALIZE); 209 if (!kbd->parent_sess) 210 return ENOMEM; 209 if (!kbd->parent_sess) { 210 ddf_msg(LVL_ERROR, "Failed creating parent session."); 211 return EIO; 212 } 211 213 212 214 kbd->kbd_fun = ddf_fun_create(dev, fun_exposed, "kbd"); 213 215 if (!kbd->kbd_fun) { 216 ddf_msg(LVL_ERROR, "Failed creating function 'kbd'."); 214 217 return ENOMEM; 215 218 } … … 218 221 int ret = ddf_fun_bind(kbd->kbd_fun); 219 222 if (ret != EOK) { 223 ddf_msg(LVL_ERROR, "Failed binding function 'kbd'."); 220 224 ddf_fun_destroy(kbd->kbd_fun); 221 return E NOMEM;225 return EEXIST; 222 226 } 223 227 224 228 ret = ddf_fun_add_to_category(kbd->kbd_fun, "keyboard"); 225 229 if (ret != EOK) { 230 ddf_msg(LVL_ERROR, "Failed adding function 'kbd' to category " 231 "'keyboard'."); 226 232 ddf_fun_unbind(kbd->kbd_fun); 227 233 ddf_fun_destroy(kbd->kbd_fun); … … 231 237 kbd->polling_fibril = fibril_create(polling, kbd); 232 238 if (!kbd->polling_fibril) { 239 ddf_msg(LVL_ERROR, "Failed creating polling fibril."); 233 240 ddf_fun_unbind(kbd->kbd_fun); 234 241 ddf_fun_destroy(kbd->kbd_fun); 235 242 return ENOMEM; 236 243 } 244 237 245 fibril_add_ready(kbd->polling_fibril); 238 246 return EOK; … … 241 249 /** Get data and parse scancodes. 242 250 * @param arg Pointer to xt_kbd_t structure. 243 * @return Never.251 * @return EIO on error. 244 252 */ 245 253 int polling(void *arg) … … 259 267 uint8_t code = 0; 260 268 ssize_t size = chardev_read(parent_exch, &code, 1); 269 if (size != 1) 270 return EIO; 261 271 262 272 /** Ignore AT command reply */ … … 269 279 map_size = sizeof(scanmap_e0) / sizeof(int); 270 280 size = chardev_read(parent_exch, &code, 1); 281 if (size != 1) 282 return EIO; 283 271 284 // TODO handle print screen 272 285 } 273 274 /* Invalid read. */275 if (size != 1) {276 continue;277 }278 279 286 280 287 /* Bit 7 indicates press/release */ -
uspace/srv/hid/input/Makefile
r293703e r312e5ff 42 42 port/niagara.c \ 43 43 port/ns16550.c \ 44 port/pl050.c \45 44 port/ski.c \ 46 45 proto/adb.c \ … … 48 47 ctl/apple.c \ 49 48 ctl/kbdev.c \ 50 ctl/pc.c \51 49 ctl/stty.c \ 52 50 ctl/sun.c \ -
uspace/srv/hid/input/input.c
r293703e r312e5ff 539 539 kbd_add_dev(&chardev_port, &stty_ctl); 540 540 #endif 541 #if defined(UARCH_arm32) && defined(MACHINE_integratorcp)542 kbd_add_dev(&pl050_port, &pc_ctl);543 #endif544 541 #if defined(MACHINE_ski) 545 542 kbd_add_dev(&ski_port, &stty_ctl); -
uspace/srv/hid/input/kbd_ctl.h
r293703e r312e5ff 50 50 extern kbd_ctl_ops_t apple_ctl; 51 51 extern kbd_ctl_ops_t kbdev_ctl; 52 extern kbd_ctl_ops_t pc_ctl;53 52 extern kbd_ctl_ops_t stty_ctl; 54 53 extern kbd_ctl_ops_t sun_ctl; -
uspace/srv/hid/input/kbd_port.h
r293703e r312e5ff 52 52 extern kbd_port_ops_t niagara_port; 53 53 extern kbd_port_ops_t ns16550_port; 54 extern kbd_port_ops_t pl050_port;55 54 extern kbd_port_ops_t ski_port; 56 55
Note:
See TracChangeset
for help on using the changeset viewer.