TERASIC_MTL(4)

πŸ’– TERASIC_MTL πŸ’–

okay bestie, so this is a page from the Kernel Interfaces Manual and it's all about the terasic_mtl driver β€” the thing that makes the Terasic/Cambridge Multi-Touch LCD go brrr. buckle up, it's giving hardware-core but make it cute πŸ¦‹


✨ NAME ✨

terasic_mtl β€” driver for the Terasic/Cambridge Multi-Touch LCD device


🌸 SYNOPSIS 🌸

device terasic_mtl

and then in /boot/device.hints you're gonna drop this whole little lineup, no cap:

hint.terasic_mtl.0.at="nexus0"
hint.terasic_mtl.0.reg_maddr=0x70400000
hint.terasic_mtl.0.reg_msize=0x1000
hint.terasic_mtl.0.pixel_maddr=0x70000000
hint.terasic_mtl.0.pixel_msize=0x177000
hint.terasic_mtl.0.text_maddr=0x70177000
hint.terasic_mtl.0.text_msize=0x2000

πŸ’… DESCRIPTION πŸ’…

so the terasic_mtl device driver is literally here to support the Terasic Multi-Touch LCD as controlled by a University of Cambridge IP Core. and because one device node could never, three device nodes get instantiated, each one repping a different service the device offers:

  • terasic_regX β€” the memory-mapped register interface, touch screen input included, bestie. yes it does that too.
  • terasic_pixelX β€” a memory-mapped frame buffer, but make it pixel-oriented.
  • terasic_textX β€” a memory-mapped frame buffer, but make it text-oriented.

and here's the iconic part: terasic_mtl devices are also attached to the syscons(4) framework, which is what implements a VT-compatible terminal hooked up to the tty(4) framework. so if you wanna launch login(1) sessions at boot, you can add ttyvX device nodes to ttys(5). slay. πŸŽ€

register, text, and pixel devices can all be accessed with the read(2) and write(2) system calls, and they can also be memory mapped using mmap(2). versatile queen πŸ‘‘


πŸ‘€ SEE ALSO πŸ‘€

login(1), ioctl(2), mmap(2), poll(2), read(2), write(2), syscons(4), tty(4), ttys(5)


πŸ¦‹ HISTORY πŸ¦‹

the terasic_mtl device driver first appeared in FreeBSD 10.0. a whole era. ✨


πŸ‘‘ AUTHORS πŸ‘‘

the terasic_mtl device driver and this manual page were developed by SRI International and the University of Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) (the one they call β€œCTSRD”), as part of the DARPA CRASH research programme. and the device driver itself was written by Robert N. M. Watson. legend behaviour, fr fr 🫢


πŸ’€ BUGS πŸ’€

okay so a few things, and we're gonna be honest about them:

  • the syscons(4) attachment does not support the hardware cursor feature. so… no cursor for you. 😭
  • a more structured interface to control registers using the ioctl(2) system call would sometimes be preferable to memory mapping. and for touch screen input, it would be highly desirable to offer a streaming interface whose events can be managed using poll(2) and related system calls, with the kernel doing the polling instead of the userspace application. imagine. πŸ™ˆ
  • terasic_mtl supports only a nexus bus attachment, which is appropriate for system-on-chip busses such as Altera's Avalon bus. so if the IP core is configured off of another bus type, then additional bus attachments will be required. that's just how it is, ngl.

heads up bestie: none of these are vibes-based complaints, they're real limitations. don't go expecting a cursor or a streaming touch interface, okay? πŸ’œ

and that's the whole page!! this was the terasic_mtl(4) manual page from the Kernel Interfaces Manual, sourced from Debian, dated August 18, 2012. mwah, go read the SEE ALSOs, iykyk πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from