Table of Contents
Once you have a working kernel module for your hardware, you can write the userspace part of your driver. You don't need any special libraries, your driver can be written in any reasonable language, you can use floating point numbers and so on. In short, you can use all the tools and libraries you'd normally use for writing a userspace application.
Information about all UIO devices is available in sysfs. The
first thing you should do in your driver is check
make sure your talking to the right device and that its kernel
driver has the version you expect.
You should also make sure that the memory mapping you need exists and has the size you expect.
There is a tool called
lsuio that lists
UIO devices and their attributes. It is available here:
lsuio you can quickly check if your
kernel module is loaded and which attributes it exports.
Have a look at the manpage for details.
The source code of
lsuio can serve as an
example for getting information about an UIO device.
uio_helper.c contains a lot of
functions you could use in your userspace driver code.