Hardware driver

This is a discussion on Hardware driver within the C Programming forums, part of the General Programming Boards category; I don't have any specific questions quite yet, but I have been asked by my company to write a hardware ...

  1. #1
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429

    Hardware driver

    I don't have any specific questions quite yet, but I have been asked by my company to write a hardware specific driver for some stuff that we are developing.

    I guess I was just wondering if anyone had an experience writing drivers, or if someone could point me to a place where I could look through some code to prepare myself. I have never written a driver before and while I know C fairly well, I don't use it on a regular basis so I'm going to need a refresher (on my own).

    I'm going to be trained on how to write the driver (probably with some sort of template), but it'd be nice to have a reference from here if I have questions.

    Thanks. Any comments welcomed.

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,652
    You'll want to know your OS and platform requirements as well (I assume you do).
    For Windows, I like this book.
    For Linux, this book is a must.

    gg

  3. #3
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    A hardware driver in C? Hmmm.

    Seems like assembly would be more suited to the task. Not saying its impossible in C with the Windows Driver SDK or DDK, but most hardware drivers are in assembly.

    You need to know a lot about the hardware you are writing the driver for. In essence you need to know how to 'talk' to the hardware since that is what your driver will be doing.

    I would need more information to help you.
    Last edited by VirtualAce; 11-14-2003 at 08:48 PM.

  4. #4
    Registered User
    Join Date
    Aug 2003
    Posts
    470
    Seems like assembly would be more suited to the task. Not saying its impossible in C with the Windows Driver SDK or DDK, but most hardware drivers are in assembly.
    Depends on the Operating system I think. Not sure how much of the windows stuft is done in assembly but most of the linux drivers are done in c with extra features.

  5. #5
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Originally posted by Bubba
    A hardware driver in C? Hmmm.

    Seems like assembly would be more suited to the task. Not saying its impossible in C with the Windows Driver SDK or DDK, but most hardware drivers are in assembly.
    Actually the DDK is built with C in mind.......most drivers are are built in C or C++ for the Windows platforms.......the HAL gives driver writers certain abilities that people believe are only available in ASM.

  6. #6
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    Originally posted by Codeplug
    You'll want to know your OS and platform requirements as well (I assume you do).
    For Windows, I like this book.
    For Linux, this book is a must.

    gg

    Sorry to not respond to this right away, I kinda forgot about it. I'm not exactly sure what OS it is going to be running on, but I've been told that it is an RTP driver. Apparently the whole concept is still somewhat experimental from what I've heard so I don't really know what I'm getting into. I guess I was just wondering if anyone has written one (a driver of any kind) that I could possible take a look at the code to see what I need to be refreshing on!?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 21
    Last Post: 06-24-2009, 09:49 AM
  2. Writing a linux hardware driver
    By nexusone in forum Linux Programming
    Replies: 1
    Last Post: 08-12-2008, 07:33 PM
  3. Registers, C++
    By yanol in forum C++ Programming
    Replies: 6
    Last Post: 06-05-2008, 02:07 AM
  4. hardware driver
    By ober in forum C Programming
    Replies: 5
    Last Post: 03-09-2004, 11:28 AM
  5. Diving into hardware device driver in Windows
    By AsAdi in forum Windows Programming
    Replies: 1
    Last Post: 02-01-2003, 02:30 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21