Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 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)
Exemplo n.º 5
0
 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)
Exemplo n.º 6
0
 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)