DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
UDI driver coding basics

Versions and header files

This section begins the examination of the source code modules for the udi_cmos and the pseudod sample drivers.

Each source code module of a UDI driver must declare which versions of the UDI interfaces are used by the module code, before defining the header files on which the source depends.

cmos_udi.c sample code (cont.)
   #define UDI_VERSION 0x101
   #define UDI_PHYSIO_VERSION 0x101
   

#include <udi.h> /* Standard UDI Definitions */ #include <udi_physio.h> /* Physical I/O Extensions */

pseudod.c sample code (cont.)
   #define UDI_VERSION 0x101
   #define	UDI_PHYSIO_VERSION 0x101
   

#include <udi.h> /* Standard UDI definitions */ #include <udi_physio.h> /* Physical I/O Extensions */ #include "pseudo.h"

These declarations ensure that the UDI implementation on the target OS provides the correct compile-time and run-time environments for the driver.

As of the release of this document, the only valid values for UDI interfaces is 0x101, corresponding to the 1.01 verison of the UDI specifications.

Both the udi_cmos and the pseudod drivers uses interfaces defined in the UDI Core Specification and UDI Physical I/O Specification, and so includes the header files required by those specifications. The pseudod driver also includes its own header file, pseudod.h.


Next topic: Region data definitions
Previous topic: Build instructions

© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - 19 June 2005