#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 by , 7 years ago
comment:2 by , 7 years ago
Milestone: | 0.7.1 |
---|
comment:3 by , 7 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:5 by , 7 years ago
Milestone: | → 0.7.2 |
---|
Note:
See TracTickets
for help on using tickets.
Note that ns8250 also implements implements methods from ipc/serial_ctl.h so it actually sort of implements two interfaces.