@@ -89,14 +89,14 @@ def __init__(self) -> None:
8989 super ().__init__ ()
9090
9191 self .gnd = self .Port (Ground .empty (), [Common ])
92- self .out = self .Port (DigitalSingleSource .empty (), [Output ])
92+ self .out = self .Port (DigitalSource .empty (), [Output ])
9393
9494 def contents (self ):
9595 super ().contents ()
9696 self .package = self .Block (Switch (current = self .out .link ().current_drawn ,
9797 voltage = self .out .link ().voltage ))
9898
99- self .connect (self .out , self .package .sw .adapt_to (DigitalSingleSource .low_from_supply (self .gnd )))
99+ self .connect (self .out , self .package .sw .adapt_to (DigitalSource .low_from_supply (self .gnd )))
100100 self .connect (self .gnd , self .package .com .adapt_to (Ground ()))
101101
102102
@@ -107,8 +107,8 @@ def __init__(self) -> None:
107107 super ().__init__ ()
108108
109109 self .gnd = self .Port (Ground .empty (), [Common ])
110- self .a = self .Port (DigitalSingleSource .empty ())
111- self .b = self .Port (DigitalSingleSource .empty ())
110+ self .a = self .Port (DigitalSource .empty ())
111+ self .b = self .Port (DigitalSource .empty ())
112112
113113
114114class DigitalWrapperRotaryEncoder (DigitalRotaryEncoder ):
@@ -118,7 +118,7 @@ def contents(self):
118118 self .package = self .Block (RotaryEncoder (current = self .a .link ().current_drawn .hull (self .b .link ().current_drawn ),
119119 voltage = self .a .link ().voltage .hull (self .b .link ().voltage )))
120120
121- dio_model = DigitalSingleSource .low_from_supply (self .gnd )
121+ dio_model = DigitalSource .low_from_supply (self .gnd )
122122 self .connect (self .a , self .package .a .adapt_to (dio_model ))
123123 self .connect (self .b , self .package .b .adapt_to (dio_model ))
124124 self .connect (self .gnd , self .package .com .adapt_to (Ground ()))
@@ -130,7 +130,7 @@ class DigitalRotaryEncoderSwitch(BlockInterfaceMixin[DigitalRotaryEncoder]):
130130 def __init__ (self , * args , ** kwargs ) -> None :
131131 super ().__init__ (* args , ** kwargs )
132132
133- self .sw = self .Port (DigitalSingleSource .empty (), optional = True )
133+ self .sw = self .Port (DigitalSource .empty (), optional = True )
134134
135135
136136class DigitalWrapperRotaryEncoderWithSwitch (DigitalRotaryEncoderSwitch , DigitalWrapperRotaryEncoder , GeneratorBlock ):
@@ -142,7 +142,7 @@ def generate(self):
142142 super ().generate ()
143143 if self .get (self .sw .is_connected ()):
144144 package_sw = self .package .with_mixin (RotaryEncoderSwitch ())
145- dio_model = DigitalSingleSource .low_from_supply (self .gnd )
145+ dio_model = DigitalSource .low_from_supply (self .gnd )
146146 self .connect (self .sw , package_sw .sw .adapt_to (dio_model ))
147147
148148
@@ -153,10 +153,10 @@ def __init__(self) -> None:
153153 super ().__init__ ()
154154
155155 self .gnd = self .Port (Ground .empty (), [Common ])
156- self .a = self .Port (DigitalSingleSource .empty ())
157- self .b = self .Port (DigitalSingleSource .empty ())
158- self .c = self .Port (DigitalSingleSource .empty ())
159- self .d = self .Port (DigitalSingleSource .empty ())
156+ self .a = self .Port (DigitalSource .empty ())
157+ self .b = self .Port (DigitalSource .empty ())
158+ self .c = self .Port (DigitalSource .empty ())
159+ self .d = self .Port (DigitalSource .empty ())
160160
161161
162162class DigitalWrapperDirectionSwitch (DigitalDirectionSwitch ):
@@ -166,7 +166,7 @@ def contents(self):
166166 self .package = self .Block (DirectionSwitch (current = self .a .link ().current_drawn .hull (self .b .link ().current_drawn ),
167167 voltage = self .a .link ().voltage .hull (self .b .link ().voltage )))
168168
169- dio_model = DigitalSingleSource .low_from_supply (self .gnd )
169+ dio_model = DigitalSource .low_from_supply (self .gnd )
170170 self .connect (self .a , self .package .a .adapt_to (dio_model ))
171171 self .connect (self .b , self .package .b .adapt_to (dio_model ))
172172 self .connect (self .c , self .package .c .adapt_to (dio_model ))
@@ -180,7 +180,7 @@ class DigitalDirectionSwitchCenter(BlockInterfaceMixin[DigitalDirectionSwitch]):
180180 def __init__ (self , * args , ** kwargs ) -> None :
181181 super ().__init__ (* args , ** kwargs )
182182
183- self .center = self .Port (DigitalSingleSource .empty (), optional = True )
183+ self .center = self .Port (DigitalSource .empty (), optional = True )
184184
185185
186186class DigitalWrapperDirectionSwitchWithCenter (DigitalDirectionSwitchCenter , DigitalWrapperDirectionSwitch ,
@@ -193,5 +193,5 @@ def generate(self):
193193 super ().generate ()
194194 if self .get (self .center .is_connected ()):
195195 package_sw = self .package .with_mixin (DirectionSwitchCenter ())
196- dio_model = DigitalSingleSource .low_from_supply (self .gnd )
196+ dio_model = DigitalSource .low_from_supply (self .gnd )
197197 self .connect (self .center , package_sw .center .adapt_to (dio_model ))
0 commit comments