|
|
The wrapper functions for a device driver can include:
For hardware drivers that use interrupts, the mod_drvattach(D3) routine must be called by the driver's _load( ) routine to add the driver's interrupts to the running system. Since interrupts are enabled upon return from mod_drvattach( ), the init(D2) routine must be called before mod_drvattach( ) is called and the start start( ) routine must be called after mod_drvattach( ).
If the driver's _load( ) routine attaches interrupts with the mod_drvattach( ) function, the _unload( ) routine must call the mod_drvdetach(D3) function to disable and remove the driver's interrupts from the running system.