Jspice3
Main Page
Data Structures
Files
File List
Globals
dioparam.c
Go to the documentation of this file.
1
/***************************************************************************
2
JSPICE3 adaptation of Spice3f2 - Copyright (c) Stephen R. Whiteley 1992
3
Copyright 1990 Regents of the University of California. All rights reserved.
4
Authors: 1985 Thomas L. Quarles
5
1992 Stephen R. Whiteley
6
****************************************************************************/
7
8
#include "
spice.h
"
9
#include <stdio.h>
10
#include "
diodefs.h
"
11
#include "
const.h
"
12
#include "
util.h
"
13
#include "
sperror.h
"
14
15
16
/* ARGSUSED */
17
int
18
DIOparam
(ckt,param,value,inst,select)
19
20
CKTcircuit
*ckt;
21
int
param;
22
IFvalue
*value;
23
GENinstance
*inst;
24
IFvalue
*select;
25
{
26
DIOinstance
*here = (
DIOinstance
*)inst;
27
28
switch
(param) {
29
case
DIO_AREA
:
30
here->
DIOarea
= value->
rValue
;
31
here->
DIOareaGiven
=
TRUE
;
32
break
;
33
case
DIO_IC
:
34
here->
DIOinitCond
= value->
rValue
;
35
break
;
36
case
DIO_OFF
:
37
here->
DIOoff
= value->
iValue
;
38
break
;
39
case
DIO_TEMP
:
40
here->
DIOtemp
= value->
rValue
+
CONSTCtoK
;
41
here->
DIOtempGiven
=
TRUE
;
42
break
;
43
default
:
44
return
(
E_BADPARM
);
45
}
46
return
(
OK
);
47
}
diodefs.h
DIO_IC
#define DIO_IC
Definition:
diodefs.h:166
CKTcircuit
Definition:
cktdefs.h:62
sDIOinstance
Definition:
diodefs.h:18
CONSTCtoK
#define CONSTCtoK
Definition:
const.h:11
E_BADPARM
#define E_BADPARM
Definition:
iferrmsg.h:26
TRUE
#define TRUE
Definition:
util.h:27
uIFvalue::iValue
int iValue
Definition:
ifsim.h:232
uIFvalue::rValue
double rValue
Definition:
ifsim.h:233
sDIOinstance::DIOtemp
double DIOtemp
Definition:
diodefs.h:50
OK
#define OK
Definition:
iferrmsg.h:17
sDIOinstance::DIOareaGiven
unsigned DIOareaGiven
Definition:
diodefs.h:43
sDIOinstance::DIOoff
unsigned DIOoff
Definition:
diodefs.h:42
sperror.h
util.h
spice.h
DIOparam
int DIOparam(CKTcircuit *ckt, int param, IFvalue *value, GENinstance *inst, IFvalue *select)
Definition:
dioparam.c:18
DIO_TEMP
#define DIO_TEMP
Definition:
diodefs.h:174
sDIOinstance::DIOtempGiven
unsigned DIOtempGiven
Definition:
diodefs.h:45
const.h
uIFvalue
Definition:
ifsim.h:231
DIO_AREA
#define DIO_AREA
Definition:
diodefs.h:165
sDIOinstance::DIOarea
double DIOarea
Definition:
diodefs.h:48
DIO_OFF
#define DIO_OFF
Definition:
diodefs.h:167
sGENinstance
Definition:
gendefs.h:24
sDIOinstance::DIOinitCond
double DIOinitCond
Definition:
diodefs.h:49
src
lib
dev
dio
dioparam.c
Generated by
1.8.11