DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
TOC PREV NEXT INDEX

General Requirements

8

8.1 Versioning

All functions and structures defined in the UDI Core Specification, except for those defined in Chapter 25, "Generic I/O Metalanguage" and Chapter 28, "Metalanguage-to-Environment Interface", are part of the "udi" interface, currently at version "0x101". A driver or library module that conforms to the UDI Core Specification, Version 1.01, must include the following declaration in its udiprops.txt file (see Chapter 30, "Static Driver Properties"):

requires udi 0x101
 

In each device driver or library source file, before including any UDI header files, the driver or library must define the preprocessor symbol, UDI_VERSION, to indicate the version of the UDI Core Specification to which it conforms, which must be the same as the interface version defined above:

#define  UDI_VERSION
 
0x101
 

As defined in Section 30.4.6, "Requires Declaration", the two least-significant hexadecimal digits of the interface version represent the minor number; the rest of the hex digits represent the major number. Versions that have the same "major version number" as an earlier version shall be backward compatible with that earlier version (i.e. a strict superset).1

8.2 Header Files

Each device driver source file must include the file "udi.h", as follows:

#include <udi.h>
 

This header file contains environment-specific definitions of standard UDI structures and types, as well as all function prototypes and other definitions needed to use the core UDI interfaces and services. Additional header files will need to be included, as required by other UDI specifications relevant to the device driver, for interfaces such as non-core services, metalanguages, bus bindings, etc. UDI drivers must not include any system header files not explicitly specified within a relevant UDI specification.

To maintain portability across UDI supportive platforms, device driver writers shall not assume any knowledge of the contents of udi.h with respect to implementation-dependent aspects of the UDI interfaces (such as the definition of handles or abstract types). Similarly, drivers shall not access any functions or objects external to the driver except those defined in the UDI Specifications to which they conform.

8.3 C Language Requirements

UDI device drivers that are written in C must be compiled using a conforming freestanding implementation of ISO C and must be strictly conforming freestanding programs in conformance with ISO/IEC 9899:1990.

All symbols with global scope will be treated uniquely to 31 characters for UDI implementations in accordance with the above ISO C specification.

8.4 Endianness Requirements

The ordering of bytes within a data value stored into memory directly by a UDI driver is referred to as the driver endianness of the driver. This ordering is typically based on the native byte ordering of the processor's instruction set, but can also be influenced by the storage model of the compiler with which the driver was compiled. UDI drivers must be compiled to execute with a driver endianness that is purely little endian or purely big endian. (See the definitions of big endian and little endian in Section 3.2.2, "Common Terms".)

1As an exception to this version compatibility, version 1.0 (0x100) is not forward compatible with any other versions bearing the major number of 1; version 1.0 of the specification cannot be wholly implemented as a functional product.


TOC PREV NEXT INDEX