ChorusOS 4.0 Device Driver Framework Guide

Include the Appropriate APIs (DKI/DDI)

As the first step, include the header files for the DKI and DDI APIs involved in the device driver's implementation. A device driver mainly uses its parent bus DDI API (and some generic DKI services like memory allocator).

The driver implementation must include:

Here is an example for a NS16x50 compatible UART device driver that uses DKI and "Common bus driver" APIs, and provides "UART device driver" DDI API.

#include 		<dki/dki.h> 
#include 		<ddi/bus/bus.h>
#include 		<ddi/uart/uart.h>
...
#include 		"ns16550.h"
#include 		"ns16650Prop.h"