forked from M-Labs/artiq
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 Comm(CommGeneric, AutoDB):
|
||||||
class DBKeys:
|
class DBKeys:
|
||||||
serial_dev = Parameter()
|
serial_dev = Argument()
|
||||||
baud_rate = Parameter(115200)
|
baud_rate = Argument(115200)
|
||||||
|
|
||||||
def open(self):
|
def open(self):
|
||||||
if hasattr(self, "port"):
|
if hasattr(self, "port"):
|
||||||
|
@ -31,7 +31,7 @@ class Comm(CommGeneric, AutoDB):
|
||||||
|
|
||||||
def read(self, length):
|
def read(self, length):
|
||||||
r = bytes()
|
r = bytes()
|
||||||
while(len(r) < length):
|
while len(r) < length:
|
||||||
r += self.port.read(length - len(r))
|
r += self.port.read(length - len(r))
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue