Method
__init__
(
self,
spi: SPI,
chip_select: Optional[DigitalInOut] = None,
*,
cs_active_value: bool = False,
baudrate: int = 100000,
polarity: int = 0,
phase: int = 0,
extra_clocks: int = 0
)
Source from the content-addressed store, hash-verified
| 55 | """ |
| 56 | |
| 57 | def __init__( |
| 58 | self, |
| 59 | spi: SPI, |
| 60 | chip_select: Optional[DigitalInOut] = None, |
| 61 | *, |
| 62 | cs_active_value: bool = False, |
| 63 | baudrate: int = 100000, |
| 64 | polarity: int = 0, |
| 65 | phase: int = 0, |
| 66 | extra_clocks: int = 0 |
| 67 | ) -> None: |
| 68 | self.spi = spi |
| 69 | self.baudrate = baudrate |
| 70 | self.polarity = polarity |
| 71 | self.phase = phase |
| 72 | self.extra_clocks = extra_clocks |
| 73 | self.chip_select = chip_select |
| 74 | self.cs_active_value = cs_active_value |
| 75 | if self.chip_select: |
| 76 | self.chip_select.value(True) |
| 77 | |
| 78 | def __enter__(self) -> SPI: |
| 79 | #while not self.spi.try_lock(): |
Callers
nothing calls this directly
Tested by
no test coverage detected