Techplex Labs
  • Home
  • Projects
    • Home Heating Automation
    • Plextex
    • ISTE Desgins >
      • A Modern OpenConcept Design
      • A Modern OceanView Design
      • A Modern Lloyd-esq Design
    • Desk Expander
    • Belgrade Public Library Renovation Project
  • Portfolio
  • Blog
  • Contact

Thoughts...

GPIO Kernel Module for the RPI

4/13/2013

3 Comments

 
The driver project is done!

Report

Picture
Click to read the report
Interested in the design of the module? Checkout my project report:
Read it here

Code

I've posted the source code of the module on Github:https://github.com/TechplexEngineer/RPi-GPIO-Kernel-Midule

Low Level RPi Registers

Picture
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.

3 Comments

The need for a GPIO Kernel Module on the RPi

4/6/2013

2 Comments

 
Picture
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

2 Comments

    Author

    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. 

    Picture

    Archives

    February 2017
    January 2017
    April 2013
    March 2013
    April 2012
    February 2012
    December 2011
    November 2011
    August 2011

    Categories

    All
    Apache
    Code
    FRC
    Javascript
    Linux
    Nginx
    PID
    Robotics
    Web

    RSS Feed

Powered by Create your own unique website with customizable templates.
  • Home
  • Projects
    • Home Heating Automation
    • Plextex
    • ISTE Desgins >
      • A Modern OpenConcept Design
      • A Modern OceanView Design
      • A Modern Lloyd-esq Design
    • Desk Expander
    • Belgrade Public Library Renovation Project
  • Portfolio
  • Blog
  • Contact