Transition from minidriver to full driver

Here's an example of the code in the full driver that arranges the transition from the minidriver:

if ((id == InterruptAttachEvent(intr, event,
              _NTO_INTR_FLAGS_TRK_MSK)) == -1)
{
   perror("InterruptAttachEvent\n");
   return (-1);
}


if ((dptr = mmap_device_memory(0, data_size,
               PROT_READ | PROT_WRITE | PROT_NOCACHE, 
               0, SYSPAGE_ENTRY(mdriver)->data_paddr)) == NULL)
{
   fprintf(stderr, "Unable to get data pointer\n");
   return (-1);
}

/* Your minidriver should now be stopped and you should 
   have access to the interrupt and the data area */

/* Enable device interrupt (intr) */

Once the full driver is attached to the interrupt, it can process any buffered data and continue to provide hardware access.