rewrite-sw, unify CKTstates[] access
do it the same way as the other devices do access CKTstates[] via CKTstate0 CKTstate1 macros access device "slots" via descriptive macros
This commit is contained in:
parent
b33f47242b
commit
5a6aef4732
|
|
@ -58,6 +58,10 @@ typedef struct sCSWinstance {
|
|||
#define CSW_OFF_CONDUCTANCE ckt->CKTgmin /* default off conductance */
|
||||
#define CSW_NUM_STATES 2
|
||||
|
||||
#define CSWswitchstate CSWstate+0
|
||||
#define CSWctrlvalue CSWstate+1
|
||||
|
||||
|
||||
typedef struct sCSWmodel { /* model structure for a switch */
|
||||
|
||||
struct GENmodel gen;
|
||||
|
|
|
|||
|
|
@ -57,6 +57,10 @@ typedef struct sSWinstance {
|
|||
#define SW_OFF_CONDUCTANCE ckt->CKTgmin /* default off conductance */
|
||||
#define SW_NUM_STATES 2
|
||||
|
||||
#define SWswitchstate SWstate+0
|
||||
#define SWctrlvalue SWstate+1
|
||||
|
||||
|
||||
typedef struct sSWmodel { /* model structure for a switch */
|
||||
|
||||
struct GENmodel gen;
|
||||
|
|
|
|||
Loading…
Reference in New Issue