def setSampleDataOnRising(self): """Configure that the data is stable on the rising edge and the data changes on the falling edge. """ self.dataOnTrailing = 0 hal.spiSetOpts(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 = 0 hal.spiSetOpts(self.port, self.bitOrder, self.dataOnTrailing, self.clockPolarity)
def setLSBFirst(self): """Configure the order that bits are sent and received on the wire to be least significant bit first. """ self.bitOrder = 0 hal.spiSetOpts(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 = 1 hal.spiSetOpts(self.port, self.bitOrder, self.dataOnTrailing, self.clockPolarity)