MCPcopy Create free account
hub / github.com/RetiredWizard/PyDOS / __enter__

Method __enter__

mpython/NanoConnect/lib/spidevice.py:78–84  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

76 self.chip_select.value(True)
77
78 def __enter__(self) -> SPI:
79 #while not self.spi.try_lock():
80 #pass
81 #self.spi.configure(baudrate=self.baudrate, polarity=self.polarity, phase=self.phase)
82 if self.chip_select:
83 self.chip_select.value(self.cs_active_value)
84 return self.spi
85
86 def __exit__(
87 self,

Callers

nothing calls this directly

Calls 1

valueMethod · 0.80

Tested by

no test coverage detected