mdriver_add()

Register the minidriver with the system

Synopsis:

int mdriver_add(char *name,
                int interrupt,
                int (*handler)( int state,
                                void *data), 
                paddr32_t data_paddr, 
                unsigned data_size)

Arguments:

name
An arbitrary character string used for identification purposes.
interrupt
The interrupt that you want to attach to.
handler
A pointer to the handler function for the minidriver. Handler function in the Writing a Minidriver chapter.
data_paddr
The physical address of a block of memory that the minidriver can use to store any data. It can be:

The virtual address of this block is passed to the handler function as its data argument.

data_size
The size of the block of memory denoted by data_paddr.

Library:

libc

Description:

This function registers the minidriver with the system, as follows:

You call mdriver_add() from main() in your board's startup code.

Returns:

The index into the mdriver section of the system page for the newly added minidriver, or -1 if the minidriver wasn't added.

Classification:

QNX Neutrino

The Safety information below is “Not applicable” because the OS isn't even running when you call mdriver_add().

Safety:
Interrupt handler Not applicable
Signal handler Not applicable
Thread Not applicable