Live data from Hacker News

Linux Kernel Module Programming Guide

sysprog21.github.io

41–44 of 44 posts

Re: Linux Kernel Module Programming Guide

#41

Earlier quoted context omitted.

I wrote some low level code to turn an Arduino into a USB audio device and bit banged audio from a couple pins. Basically no experience in hardware stuff. But to be clear, getting good at programming is definitely a year+ kinda thing, of full time focus.

How did you end up doing USB with the Arduino? Was it bit banged as well (VUSB)? Is this code available anywhere?

The newer arduino's come with a pretty powerful IC for the usb interface. So I reflashed that using LUFA. To be clear the audio quality was awful, but could certainly hear what was playing. Here is the repo for it. I did it as a self directed class in university. Treat it like I had no idea what I was doing trying to understand lower level programming! https://github.com/ElementalWarrior/ArduinoAudio (This was in C, not part of the Arduino ecosystem with the IDE)

Re: Linux Kernel Module Programming Guide

#42

Earlier quoted context omitted.

So you would basically either have to be from the company that made the hardware, or have the full documentation for it, or be an insanely talented reverse engineer.

You need to have the datasheet. These are usually a Google search away and the way people develop drivers even in professional settings. For simple devices (e.g. I2C/SPI sensors) the functionality, number of registers, and procedures are usually very limited and it is not difficult.

For simple devices probably user space is just fine. i.e. https://www.kernel.org/doc/Documentation/spi/spidev Usually only if you need an IRQ or something does it require kernel space.

Re: Linux Kernel Module Programming Guide

#43

This looks really good. :) Pity it's on GitHub Pages though, so people using IPv6 only can't access it. :(

Hold up.... People are using IPV6 only networks now? There aren't ipv4 bridges? That's kind of disconcerting. This is a first time hearing of such. While I have no doubt it can be done technically but why can't you get to IPV4 networks?

Re: Linux Kernel Module Programming Guide

#44
post #5

Earlier quoted context omitted.

So offer to mirror it then. The D in git’s DVCS stands for “decentralised”. I’ve heard some dumb complaints in my time but the real beauty of this one is you made it on another site that’s IPv4 only (HN doesn’t yet support IPv6 either).

If it were something I was likely to be using a bunch, then I probably would. Saying that it's a "dumb complaint" to point out that large parts of the world can't access the content is kind of taking the piss though. :(

Saying “large parts of the world can’t access [IPv4]” is massively over exaggerating the situation. Particularly when most of the web is still IPv4 only.

You do actually realise that even users with only an IPv6 address can still get access to IPv4 sites via bridges (the names of which escape me off hand)?

Post reply on HN