@@ -129,9 +129,9 @@ class FetPrecharge(Block):
129129
130130 TODO: calculate power rating needed for some capacitance instead of spec'ing for DC"""
131131 @init_in_parent
132- def __init__ (self , precharge_resistance : RangeLike = 100 * Ohm (tol = 0.1 ),
132+ def __init__ (self , * , precharge_resistance : RangeLike = 100 * Ohm (tol = 0.1 ),
133133 pull_resistance : RangeLike = 10 * kOhm (tol = 0.05 ),
134- max_rds : FloatLike = 1 * Ohm ):
134+ max_rds : FloatLike = 1 * Ohm , clamp_voltage : RangeLike = RangeExpr . ZERO ):
135135 super ().__init__ ()
136136 self .gnd = self .Port (Ground .empty (), [Common ])
137137 self .pwr_in = self .Port (VoltageSink .empty (), [Input , Power ])
@@ -141,12 +141,13 @@ def __init__(self, precharge_resistance: RangeLike = 100*Ohm(tol=0.1),
141141 self .precharge_resistance = self .ArgParameter (precharge_resistance )
142142 self .pull_resistance = self .ArgParameter (pull_resistance )
143143 self .max_rds = self .ArgParameter (max_rds )
144+ self .clamp_voltage = self .ArgParameter (clamp_voltage )
144145
145146 def contents (self ):
146147 super ().contents ()
147148
148149 self .switch = self .Block (HighSideSwitch (
149- pull_resistance = self .pull_resistance , max_rds = self .max_rds ))
150+ pull_resistance = self .pull_resistance , max_rds = self .max_rds , clamp_voltage = self . clamp_voltage ))
150151 self .connect (self .switch .gnd , self .gnd )
151152 self .connect (self .switch .pwr , self .pwr_in )
152153 self .connect (self .switch .control , self .control )
0 commit comments