Listing 5 (labmastr.c) Basic Routines Required for Programming the Lab Master AD
/***************************************************** Copyright Don Bradley, 1991. Permission is granted for used of these routines in any manner as long as this copyright notice is included. Tested using Quick C 2.5 and MSC 6.0 on a Toshiba T5200. *****************************************************/ #include <conio.h> #include "labmastr.h" int LabMasterAD_Enable() /*& Enables the Labmaster AD card. Returns Enable Status. */ { if(LabMasterAD_Product() != LM_ID) return (0); outp(BRD_ENABLE, 1); return (inp(BRD_ENABLE) & 1); } int LabMasterAD_Disable() /*& Disables the Labmaster AD card. Returns Enable Status. */ { outp(BRD_ENABLE, 0); return (inp(BRD_ENABLE) & 1); } int LabMasterAD_Product() /*& Returns the Labmaster AD Product Code */ { return (inp(PRODUCT)); } int LabMasterAD_Version() /*& Returns the Labmaster AD Version Number */ { return (inp(VERSION)); } /* End of File */