Method
__exit__
(
self,
exc_type: Optional[Type[type]],
exc_val: Optional[BaseException],
exc_tb: Optional[TracebackType],
)
Source from the content-addressed store, hash-verified
| 84 | return self.spi |
| 85 | |
| 86 | def __exit__( |
| 87 | self, |
| 88 | exc_type: Optional[Type[type]], |
| 89 | exc_val: Optional[BaseException], |
| 90 | exc_tb: Optional[TracebackType], |
| 91 | ) -> bool: |
| 92 | if self.chip_select: |
| 93 | self.chip_select.value(not self.cs_active_value) |
| 94 | if self.extra_clocks > 0: |
| 95 | buf = bytearray(1) |
| 96 | buf[0] = 0xFF |
| 97 | clocks = self.extra_clocks // 8 |
| 98 | if self.extra_clocks % 8 != 0: |
| 99 | clocks += 1 |
| 100 | for _ in range(clocks): |
| 101 | self.spi.write(buf) |
| 102 | #self.spi.unlock() |
| 103 | return False |
Callers
nothing calls this directly
Tested by
no test coverage detected