isa_ids.h
Go to the documentation of this file.00001 #ifndef ISA_IDS_H
00002 #define ISA_IDS_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 FILE_LICENCE ( GPL2_OR_LATER );
00023
00024 #include <byteswap.h>
00025
00026
00027
00028
00029
00030 #define ISA_VENDOR( a, b, c ) \
00031 bswap_16 ( ( ( ( (a) - 'A' + 1 ) & 0x1f ) << 10 ) | \
00032 ( ( ( (b) - 'A' + 1 ) & 0x1f ) << 5 ) | \
00033 ( ( ( (c) - 'A' + 1 ) & 0x1f ) << 0 ) )
00034
00035 #define ISAPNP_VENDOR( a, b, c ) ISA_VENDOR ( a, b, c )
00036 #define EISA_VENDOR( a, b, c ) ISA_VENDOR ( a, b, c )
00037
00038 #define GENERIC_ISAPNP_VENDOR ISAPNP_VENDOR ( 'P','N','P' )
00039
00040
00041
00042
00043
00044 #define ISA_PROD_ID_MASK ( 0xf0ff )
00045 #define ISA_PROD_ID(product) ( (product) & ISA_PROD_ID_MASK )
00046 #define ISA_PROD_REV(product) ( ( (product) & ~ISA_PROD_ID_MASK ) >> 8 )
00047
00048
00049 extern char * isa_id_string ( unsigned int vendor, unsigned int product );
00050
00051 #endif