Esempio 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 = False
     hal.setSPIOpts(self.port, self.bitOrder, self.dataOnTrailing,
                    self.clockPolarity)
Esempio 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 = False
     hal.setSPIOpts(self.port, self.bitOrder, self.dataOnTrailing,
                    self.clockPolarity)
Esempio n. 3
0
 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)
Esempio n. 4
0
 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)
Esempio n. 5
0
 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)
Esempio n. 6
0
 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)
Esempio n. 7
0
 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)
Esempio n. 8
0
 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)
Esempio n. 9
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 = False
     hal.setSPIOpts(self.port, self.bitOrder, self.dataOnTrailing,
                    self.clockPolarity)
Esempio n. 10
0
 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
     )
Esempio n. 11
0
 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
     )
Esempio n. 12
0
    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)
Esempio n. 13
0
    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)
Esempio n. 14
0
    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
        )
Esempio n. 15
0
    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
        )
Esempio n. 16
0
 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)
Esempio n. 17
0
 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)
Esempio n. 18
0
 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
     )