how to write low-level code?

I’d like to learn how can I access low-level hardware features in my own
resource manager. I wish I could write a driver for PCI card (bt878-based
framegrabber), where should I start? I’ve got source code of linux kernel
bt848/878 module I’d like to port to QNX Neutrino. I read about IRQ
handlers, but I still don’t know how can I find which IRQ is assigned to
my card (and what to do if I put more than one such a cards into my PC)
(sure, I can run windows to check IRQ, but it’s the worst way). Anyone can
give me advice about knowledge base on this topic?

Paul Osmialowski wrote:

I’d like to learn how can I access low-level hardware features in my own
resource manager. I wish I could write a driver for PCI card (bt878-based
framegrabber), where should I start? I’ve got source code of linux kernel
bt848/878 module I’d like to port to QNX Neutrino. I read about IRQ
handlers, but I still don’t know how can I find which IRQ is assigned to
my card (and what to do if I put more than one such a cards into my PC)
(sure, I can run windows to check IRQ, but it’s the worst way). Anyone can
give me advice about knowledge base on this topic?

I did a bit of start of this :=) (init the device and such amazing stuff
:wink: )
Then i realized i’m still way to newbie to make drivers and gave up
temporarly :=)

look at the pci_* funcs
Interrupt* funcs
mmap*

pci_find_device will return a struct with all info you need , mem
addy’s, IRQ etc.

Please let me know of any progress :smiley: (i also recommend the *BSD
driver… it was lots easier to understand, atleast for me)