def _get_bit_order(self):
        # Get mode
        buf = array.array('B', [0])
        try:
            fcntl.ioctl(self._fd, SPI._SPI_IOC_RD_MODE, buf, True)
        except __HOLE__ as e:
            raise SPIError(e.errno, "Getting SPI mode: " + e.strerror)

        if (buf[0] & SPI._SPI_LSB_FIRST) > 0:
            return "lsb"

        return "msb"
dataset/ETHPy150Open vsergeev/python-periphery/periphery/spi.py/SPI._get_bit_order