00001 #ifndef __PORTS_H 00002 #define __PORTS_H 00003 00004 /**********************************************************/ 00005 /*/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\*/ 00006 /* 00007 Copyright: 1993 - Grupo de Voz (DAET) ETSII/IT-Bilbao 00008 00009 Nombre fuente................ PORTS.H 00010 Nombre paquete............... - 00011 Lenguaje fuente.............. C (Borland C/C++ 3.1) 00012 Estado....................... Completado 00013 Dependencia Hard/OS.......... Puertos 00014 Codigo condicional........... - 00015 00016 Codificacion................. Borja Etxebarria 00017 00018 Version dd/mm/aa Autor Proposito de la edicion 00019 ------- -------- -------- ----------------------- 00020 1.0.0 19/02/94 Borja Codificacion inicial. 00021 00022 ======================== Contenido ======================== 00023 Macros para leer/escribir en un puerto. 00024 .................... 00025 Macros to read/write a port 00026 =========================================================== 00027 */ 00028 /*/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\*/ 00029 /**********************************************************/ 00030 00031 /**********************************************************/ 00032 00033 #include <dos.h> /* para outportb() e inportb() */ 00034 00035 /* escribir {value} (UINT8) a un puerto {port} (UINT16) 00036 .................... 00037 writes {value} (byte, UINT8) to port {port} (UINT16). */ 00038 #define OUTPORT8(port,value) outportb(port,value) 00039 /* macro que lee un octeto (UINT8) de un puerto {port} (UINT16) 00040 .................... 00041 reads a byte (UINT8) from port {port} (UINT16) */ 00042 #define INPORT8(port) inportb(port) 00043 00044 /* escribir {value} (UINT16) a un puerto {port} (UINT16) 00045 .................... 00046 writes {value} (int, UINT16) to port {port} (UINT16). */ 00047 #define OUTPORT16(port,value) outport(port,value) 00048 /* macro que lee un UINT16 de un puerto {port} (UINT16) 00049 .................... 00050 reads an int (UINT16) from port {port} (UINT16) */ 00051 #define INPORT16(port) inport(port) 00052 00053 /**********************************************************/ 00054 00055 #endif 00056