File tree Expand file tree Collapse file tree
cpython/kbdFeatherWing/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ class PyDOS_UI:
3333 SHIFT = 1
3434 ALT = 2
3535 #_kbd = None
36+ _I2C_power = None
3637
3738 def __init__ (self ):
3839 # Release any resources currently in use for the displays
@@ -53,6 +54,11 @@ def __init__(self):
5354 self .lastCmdLine = ""
5455
5556 def I2C ():
57+ if 'I2C_POWER_INVERTED' in dir (board ) and not PyDOS_UI ._I2C_power :
58+ PyDOS_UI ._I2C_power = digitalio .DigitalInOut (board .I2C_POWER_INVERTED )
59+ PyDOS_UI ._I2C_power .direction = digitalio .Direction .OUTPUT
60+ PyDOS_UI ._I2C_power .value = False
61+
5662 return board .I2C ()
5763
5864 def serial_bytes_available (self ):
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ class PyDOS_UI:
3333 SHIFT = 1
3434 ALT = 2
3535 #_kbd = None
36+ _I2C_power = None
3637
3738 def __init__ (self ):
3839 # Release any resources currently in use for the displays
@@ -53,6 +54,11 @@ def __init__(self):
5354 self .lastCmdLine = ""
5455
5556 def I2C ():
57+ if 'I2C_POWER_INVERTED' in dir (board ) and not PyDOS_UI ._I2C_power :
58+ PyDOS_UI ._I2C_power = digitalio .DigitalInOut (board .I2C_POWER_INVERTED )
59+ PyDOS_UI ._I2C_power .direction = digitalio .Direction .OUTPUT
60+ PyDOS_UI ._I2C_power .value = False
61+
5662 return board .I2C ()
5763
5864 def serial_bytes_available (self ):
You can’t perform that action at this time.
0 commit comments