Fork us on GitHub Follow us on Facebook Follow us on Twitter

Opened 2 years ago

Closed 2 years ago

Last modified 2 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:

Description

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 Changed 2 years ago by Jiri Svoboda

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

comment:2 Changed 2 years ago by Jakub Jermář

Milestone: 0.7.1

comment:3 Changed 2 years ago by Jiri Svoboda

Owner: set to Jiri Svoboda
Status: newassigned

comment:4 Changed 2 years ago by Jiri Svoboda

Resolution: fixed
Status: assignedclosed

comment:5 Changed 2 years ago by Jakub Jermář

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