(self)
check ep for data, add it to queue and sleep for interval
check ep for data, add it to queue and sleep for interval
check ep for data add it to queue and sleep for interval
def _read(self):
        """ check ep for data, add it to queue and sleep for interval """
        while self._rxactive:
            try:
                rv = self._ep_in.read(self._ep_in.wMaxPacketSize)
                if self._isFTDI:
                    status = rv[:2] # FTDI prepends 2 flow control characters,
                    # modem status and line status of the UART
                    if status[0] != 1 or status[1] != 0x60:
                        log.info(
                            "USB Status: 0x{0:02X} 0x{1:02X}".format(
                                *status))
                    rv = rv[2:]
                for rvi in rv:
                    self._rxqueue.put(rvi)
            except usb.USBError as e:
                log.warn("USB Error on _read {}".format(e))
                return
            
            time.sleep(self._rxinterval)
def _read ( self ) : while self . _rxactive : try : rv = self . _ep_in . read ( self . _ep_in . wMaxPacketSize ) if self . _isFTDI : status = rv [ : 2 ] # FTDI prepends 2 flow control characters, # modem status and line status of the UART if status [ 0 ] != 1 or status [ 1 ] != 0x60 : log . info ( "USB Status: 0x{0:02X} 0x{1:02X}" . format ( * status ) ) rv = rv [ 2 : ] for rvi in rv : self . _rxqueue . put ( rvi ) except usb . USBError as e : log . warn ( "USB Error on _read {}" . format ( e ) ) return time . sleep ( self . _rxinterval )