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

        return buf[0]
dataset/ETHPy150Open vsergeev/python-periphery/periphery/spi.py/SPI._get_bits_per_word