예제 #1
0
파일: olimex.py 프로젝트: GRay63/blmaudit
 def open(self):
     with self.mylock:
         if not self.isOpen():
             if self.olimex_sn:
                 self.port = ttyusb.find_tty_acm_sn(
                     '0483', '5740', self.olimex_sn)
             else:
                 olimex_ports = ttyusb.find_tty_acm('0483', '5740')
                 if len(olimex_ports) > 1:
                     raise 'more than one olimex connected'\
                     'but serial number is not specified'
                 self.port = olimex_ports[0]
             super(Olimex, self).open()
     return self.port
예제 #2
0
파일: blmaudit.py 프로젝트: GRay63/blmaudit
def find_olimex_port(self):
    """ Find the Olimex serial port that is connected"""
    self.olimex_port = ttyusb.find_tty_acm_sn('0483', '5740', olimex_sn)
    return self.olimex_port