Jspice3
Main Page
Data Structures
Files
File List
Globals
swparam.c
Go to the documentation of this file.
1
/***************************************************************************
2
JSPICE3 adaptation of Spice3e2 - Copyright (c) Stephen R. Whiteley 1992
3
Copyright 1990 Regents of the University of California. All rights reserved.
4
Authors: 1985 Gordon M. Jacobs
5
1992 Stephen R. Whiteley
6
****************************************************************************/
7
8
#include "
spice.h
"
9
#include <stdio.h>
10
#include "
swdefs.h
"
11
#include "
sperror.h
"
12
#include "
util.h
"
13
14
15
/*ARGSUSED*/
16
int
17
SWparam
(ckt,param,value,inst,select)
18
19
CKTcircuit
*ckt;
20
int
param;
21
IFvalue
*value;
22
GENinstance
*inst;
23
IFvalue
*select;
24
{
25
SWinstance
*here = (
SWinstance
*)inst;
26
27
switch
(param) {
28
29
case
SW_IC_ON
:
30
if
(value->
iValue
) {
31
here->
SWzero_stateGiven
=
TRUE
;
32
}
33
break
;
34
case
SW_IC_OFF
:
35
if
(value->
iValue
) {
36
here->
SWzero_stateGiven
=
FALSE
;
37
}
38
break
;
39
case
SW_CONTROL
:
40
here->
SWcontName
= value->
uValue
;
41
break
;
42
default
:
43
return
(
E_BADPARM
);
44
}
45
return
(
OK
);
46
}
sSWinstance::SWcontName
IFuid SWcontName
Definition:
swdefs.h:30
FALSE
#define FALSE
Definition:
mfb.h:23
SW_IC_OFF
#define SW_IC_OFF
Definition:
swdefs.h:87
CKTcircuit
Definition:
cktdefs.h:62
sSWinstance
Definition:
swdefs.h:18
SW_IC_ON
#define SW_IC_ON
Definition:
swdefs.h:86
SWparam
int SWparam(CKTcircuit *ckt, int param, IFvalue *value, GENinstance *inst, IFvalue *select)
Definition:
swparam.c:17
E_BADPARM
#define E_BADPARM
Definition:
iferrmsg.h:26
TRUE
#define TRUE
Definition:
util.h:27
swdefs.h
uIFvalue::iValue
int iValue
Definition:
ifsim.h:232
OK
#define OK
Definition:
iferrmsg.h:17
sSWinstance::SWzero_stateGiven
unsigned SWzero_stateGiven
Definition:
swdefs.h:43
sperror.h
util.h
spice.h
uIFvalue
Definition:
ifsim.h:231
SW_CONTROL
#define SW_CONTROL
Definition:
swdefs.h:92
sGENinstance
Definition:
gendefs.h:24
uIFvalue::uValue
IFuid uValue
Definition:
ifsim.h:236
src
lib
dev
sw
swparam.c
Generated by
1.8.11