Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#696 closed enhancement (fixed)

Three character device interfaces is a crowd

Reported by: Jiri Svoboda Owned by: Jiri Svoboda
Priority: major Milestone: 0.7.2
Component: helenos/unspecified Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:


Currently there are three different character device interfaces in use by different drivers:

  • uspace/lib/c/include/ipc/char.h (s3c24xx_uart)
  • uspace/lib/c/include/ipc/chardev.h (pl050, i8042)
  • uspace/lib/drv/include/ops/char_dev.h (ns8250, test1)

Each interface has different pros and cons (both in terms of API and implementation).

  • char.h is can only transfer one byte at a time, but has asynchronous reception
  • chardev.h has full client/server library wrappers (chardev_srv.c/chardev.c), it can only transfer a few bytes at a time
  • char_dev.h can transfer up to 256 bytes using internal buffers whose size cannot be configured; it requires devman method dispatcher

Ultimately we should have a single interface, hopefully better than each of those we currently have.

Change History (5)

comment:1 by Jiri Svoboda, 7 years ago

Note that ns8250 also implements implements methods from ipc/serial_ctl.h so it actually sort of implements two interfaces.

comment:2 by Jakub Jermář, 7 years ago

Milestone: 0.7.1

comment:3 by Jiri Svoboda, 6 years ago

Owner: set to Jiri Svoboda
Status: newassigned

comment:4 by Jiri Svoboda, 6 years ago

Resolution: fixed
Status: assignedclosed

comment:5 by Jakub Jermář, 6 years ago

Milestone: 0.7.2
Note: See TracTickets for help on using tickets.