def _get_max_speed(self):
        # Get max speed
        buf = array.array('I', [0])
        try:
            fcntl.ioctl(self._fd, SPI._SPI_IOC_RD_MAX_SPEED_HZ, buf, True)
        except __HOLE__ as e:
            raise SPIError(e.errno, "Getting SPI max speed: " + e.strerror)

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