mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 11:18:27 +08:00
coredevice/comm_serial: minor cleanup
This commit is contained in:
parent
cb2596bd81
commit
f427041ae9
@ -11,8 +11,8 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
class Comm(CommGeneric, AutoDB):
|
||||
class DBKeys:
|
||||
serial_dev = Parameter()
|
||||
baud_rate = Parameter(115200)
|
||||
serial_dev = Argument()
|
||||
baud_rate = Argument(115200)
|
||||
|
||||
def open(self):
|
||||
if hasattr(self, "port"):
|
||||
@ -31,7 +31,7 @@ class Comm(CommGeneric, AutoDB):
|
||||
|
||||
def read(self, length):
|
||||
r = bytes()
|
||||
while(len(r) < length):
|
||||
while len(r) < length:
|
||||
r += self.port.read(length - len(r))
|
||||
return r
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user