From 40192bd6b3ee8547b5eb8e11d5531493ed7cdd2c Mon Sep 17 00:00:00 2001 From: Marty Kraimer Date: Wed, 14 Sep 1994 15:23:00 +0000 Subject: [PATCH] Added mz8310NoShutdown and got rid of some warning messages --- src/dev/devMz8310.c | 52 +++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/src/dev/devMz8310.c b/src/dev/devMz8310.c index c0c4e7299..2714dc17e 100644 --- a/src/dev/devMz8310.c +++ b/src/dev/devMz8310.c @@ -47,6 +47,9 @@ /* the Advanced Micro Devices Am9513 Technical Manual */ #include +#include +#include +#include #include #include #include @@ -99,6 +102,7 @@ MZDSET devPtMz8310= { 5, NULL, NULL, init_pt, NULL, write_pt}; static void mz8310_int_service(IOSCANPVT); volatile int mz8310Debug=0; +int mz8310NoShutdown=0; static unsigned short *shortaddr; /* definitions related to fields of records*/ @@ -157,7 +161,6 @@ static struct { static double cons[] = { 1,1e-3,1e-6,1e-9,1,1e-12 }; /*keep information needed for reporting*/ -static int ncards=0; static struct mz8310_info { short present; FAST_LOCK lock; @@ -237,43 +240,40 @@ static unsigned short internalCountSource[] = {F1,F2,F3,F4,F5}; /*The following are used to communicate with the mz8310. */ /*The mz8310 can not keep up when commands are sent as rapidly as possible.*/ -putCmd(preg,cmd) - unsigned char *preg; - unsigned char cmd; +void putCmd(volatile unsigned char *preg,unsigned char cmd) { *preg = cmd; - if(mz8310Debug) printf("mz8310:putCmd: pcmdreg=%x cmd=%x %d\n",preg,cmd,cmd); + if(mz8310Debug) printf("mz8310:putCmd: pcmdreg=%p cmd=%x %u\n", + preg,cmd,cmd); } -putData(preg,data) - unsigned short *preg; - unsigned short data; +void putData(volatile unsigned short *preg,unsigned short data) { *preg = data; - if(mz8310Debug) printf("mz8310:putData: preg=%x data=%x %d\n",preg,data,data); + if(mz8310Debug) printf("mz8310:putData: preg=%p data=%x %u\n", + preg,data,data); } -getCmd(preg,pcmd) - unsigned char *preg; - unsigned char *pcmd; +void getCmd(volatile unsigned char *preg,unsigned char *pcmd) { *pcmd = *preg; - if(mz8310Debug) printf("mz8310:getCmd: pcmdreg=%x cmd=%x %d\n",preg,*pcmd,*pcmd); + if(mz8310Debug) printf("mz8310:getCmd: pcmdreg=%p cmd=%x %u\n", + preg,*pcmd,*pcmd); } -getData(preg,pdata) - unsigned short *preg; - unsigned short *pdata; +void getData(volatile unsigned short *preg,unsigned short *pdata) { *pdata = *preg; - if(mz8310Debug) printf("mz8310:getData: preg=%x data=%x %d\n",preg,*pdata,*pdata); + if(mz8310Debug) printf("mz8310:getData: preg=%p data=%x %u\n", + preg,*pdata,*pdata); } -static void Mz8310_shutdown() +static int Mz8310_shutdown() { int card,chip; volatile unsigned char *pcmd; + if(mz8310NoShutdown) return(0); for(card=0;carddpvt) return(S_dev_NoInit);