Read it here
The driver project is done!
Click to read the report
Interested in the design of the module? Checkout my project report:
Read it here
I've posted the source code of the module on Github:https://github.com/TechplexEngineer/RPi-GPIO-Kernel-Midule
Low Level RPi Registers
Click for larger view
If you aim to travel down to the Raspberry Pi's low level registers to control your GPIO pins this resource might help you. In the process of developing my Kernel Module I needed a register map that was easy to understand and didn't require a lot of mental visualization. Since the documentation from Broadcom describes the registers quite well I was able to make a more visual document to aid in my debugging and development.
The Raspberry Pi(RPi) is a credit card sized computer that is an amazing and affordable toy. Lest we forget the numerous uses in prototypes and experiments.
Anyone that has experimented with using the GPIO(General Purpose Input & Output) pins on the RPi may have noticed that their program must be run as root (with sudo). For me this is rather bothersome, I don't like running any program as root unless I absolutely have to. In my research I found that Gordon over at projects.drogon.net has an amazing Wiring like library for the Raspberry Pi called WiringPi ofcourse! He's also included a nifty GPIO command line utility which allows exporting GPIO to a "/sys/class/gpio/" interface thereby allowing user code to access the pins without being run as root.
I think we can do better! Lets talk Linux Kernel for a minute here, the kernel is a resource manager, the GPIO pins are a resource. The out of the box kernel doesn't support our gpio pins! Dang..... No problem we'll just write a Kernel Module to manage access to our GPIO pins.
There are a bunch of ways to provide access to the GPIO pins, in my case ioctl calls will work just fine.
So there's the background, heres the news:
I'm developing a linux kernel module that will provide an ioctl interface to the Raspberry Pi's GPIO pins so that programs in userspace can access the pins without being run as root.
The next steps are to write a wrapper for my modules low level interface to make using it more appealing in everday code. Following that I'm hoping to integrate it into WiringPi for an even more streamlined approach.
Stay tuned! I hope you are excited as I am!
Raspberry Pi is a trademark of the Raspberry Pi Foundation
Blake is a recent graduate of the University of Maine with a Computer Engineering degree. Blake set out to work closely with industry professionals to provide products and solutions specially tailored to some of the costliest problems.