Thread: Writing a linux hardware driver

  1. #1
    Registered User
    Join Date
    Aug 2008
    Location
    Gastonia, NC
    Posts
    2

    Writing a linux hardware driver

    I have build a POV display 8 X 10 pixels that runs from the parallel
    port.
    Right now I have a some crude code in 'C' that displays static images.
    Would like to interface it with Amarok or Xine engine to display freq.
    graph or some effects.

    I would like to write a driver so I don't have to be Root to access
    the parallel port.
    And make it sort of open so that if I make a larger display can reuse
    the code or some other parallel project.

    Function's I am thinking of:

    1. Init the device
    2. open device "User"
    2. Create a display buffer's, option of multiple buffers for
    animation.
    3. Write to buffer
    4. Read buffer
    5. Clear buffer
    6. Control, Refresh speed for display, set active buffer
    7. Close device "User"
    8. Remove device

    My though is that once the driver is initialized it will loop through
    the selected buffer at a set times per second. What I am not sure
    about is how you make the driver do this as a back ground task of
    refreshing the display. Looking for some suggestions, maybe if there
    is some code out there similar to what I want to do.

    Eric

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    I've used paraport in the past for custom device interaction under Linux: http://people.redhat.com/twaugh/parport/
    You could modify the driver or even use it as-is from a user-mode app.

    Linux driver resource: http://www.linuxdriver.co.il/ldd3/

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to get started with writing driver in Linux?
    By Maz in forum C Programming
    Replies: 1
    Last Post: 04-21-2009, 09:10 AM
  2. linux writing often on main disk
    By mynickmynick in forum Linux Programming
    Replies: 17
    Last Post: 04-07-2009, 02:05 PM
  3. Why Linux, for the average user?
    By Hunter2 in forum A Brief History of Cprogramming.com
    Replies: 32
    Last Post: 07-07-2006, 02:36 PM
  4. Folding@Home Cboard team?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 398
    Last Post: 10-11-2005, 08:44 AM
  5. Linux Linux why Linux??
    By afreedboy in forum Tech Board
    Replies: 146
    Last Post: 01-21-2004, 06:27 PM