def setSampleDataOnRising(self): """Configure that the data is stable on the rising edge and the data changes on the falling edge. """ self.dataOnTrailing = False hal.setSPIOpts(self.port, self.bitOrder, self.dataOnTrailing, self.clockPolarity)
def setClockActiveHigh(self): """Configure the clock output line to be active high. This is sometimes called clock polarity low or clock idle low. """ self.clockPolarity = False hal.setSPIOpts(self.port, self.bitOrder, self.dataOnTrailing, self.clockPolarity)
def setMSBFirst(self): """Configure the order that bits are sent and received on the wire to be most significant bit first. """ self.bitOrder = True hal.setSPIOpts(self.port, self.bitOrder, self.dataOnTrailing, self.clockPolarity)
def setClockActiveLow(self) -> None: """Configure the clock output line to be active low. This is sometimes called clock polarity high or clock idle high. """ self.clockPolarity = True hal.setSPIOpts(self.port, self.bitOrder, self.dataOnTrailing, self.clockPolarity)
def setClockActiveHigh(self) -> None: """Configure the clock output line to be active high. This is sometimes called clock polarity low or clock idle low. """ self.clockIdleHigh = False hal.setSPIOpts(self.port, self.msbFirst, self.sampleOnTrailing, self.clockIdleHigh)
def setLSBFirst(self) -> None: """Configure the order that bits are sent and received on the wire to be least significant bit first. """ self.msbFirst = False hal.setSPIOpts(self.port, self.msbFirst, self.sampleOnTrailing, self.clockIdleHigh)
def setClockActiveHigh(self) -> None: """Configure the clock output line to be active high. This is sometimes called clock polarity low or clock idle low. """ self.clockIdleHigh = False hal.setSPIOpts( self.port, self.msbFirst, self.sampleOnTrailing, self.clockIdleHigh )
def setLSBFirst(self) -> None: """Configure the order that bits are sent and received on the wire to be least significant bit first. """ self.msbFirst = False hal.setSPIOpts( self.port, self.msbFirst, self.sampleOnTrailing, self.clockIdleHigh )
def setSampleDataOnRising(self) -> None: """ Configure that the data is stable on the rising edge and the data changes on the falling edge. .. deprecated:: 2019.0.0 Use setSampleDataOnLeadingEdge in most cases """ self.sampleOnTrailing = False hal.setSPIOpts(self.port, self.msbFirst, self.sampleOnTrailing, self.clockIdleHigh)
def setSampleDataOnFalling(self) -> None: """ Configure that the data is stable on the falling edge and the data changes on the rising edge. Note that this gets reversed if setClockActiveLow is set .. deprecated:: 2019.0.0 Use setSampleDataOnTrailingEdge in most cases """ self.sampleOnTrailing = True hal.setSPIOpts(self.port, self.msbFirst, self.sampleOnTrailing, self.clockIdleHigh)
def setSampleDataOnRising(self) -> None: """ Configure that the data is stable on the rising edge and the data changes on the falling edge. .. deprecated:: 2019.0.0 Use setSampleDataOnLeadingEdge in most cases """ self.sampleOnTrailing = False hal.setSPIOpts( self.port, self.msbFirst, self.sampleOnTrailing, self.clockIdleHigh )
def setSampleDataOnFalling(self) -> None: """ Configure that the data is stable on the falling edge and the data changes on the rising edge. Note that this gets reversed if setClockActiveLow is set .. deprecated:: 2019.0.0 Use setSampleDataOnTrailingEdge in most cases """ self.sampleOnTrailing = True hal.setSPIOpts( self.port, self.msbFirst, self.sampleOnTrailing, self.clockIdleHigh )
def setSampleDataOnTrailingEdge(self) -> None: """Configure that the data is stable on the trailing edge and the data changes on the leading edge.""" self.dataOnTrailing = True hal.setSPIOpts(self.port, self.bitOrder, self.dataOnTrailing, self.clockPolarity)
def setSampleDataOnTrailingEdge(self) -> None: """Configure that the data is stable on the trailing edge and the data changes on the leading edge.""" self.sampleOnTrailing = True hal.setSPIOpts(self.port, self.msbFirst, self.sampleOnTrailing, self.clockIdleHigh)
def setSampleDataOnTrailingEdge(self) -> None: """Configure that the data is stable on the trailing edge and the data changes on the leading edge.""" self.sampleOnTrailing = True hal.setSPIOpts( self.port, self.msbFirst, self.sampleOnTrailing, self.clockIdleHigh )