forked from M-Labs/artiq
coredevice/rtio: minor docstring cleanup
This commit is contained in:
parent
ffe4ee9137
commit
ecf6b29279
|
@ -10,7 +10,6 @@ class LLRTIOOut(AutoDB):
|
||||||
|
|
||||||
This is meant to be used mostly in drivers; consider using
|
This is meant to be used mostly in drivers; consider using
|
||||||
``RTIOOut`` instead.
|
``RTIOOut`` instead.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
class DBKeys:
|
class DBKeys:
|
||||||
core = Device()
|
core = Device()
|
||||||
|
@ -29,7 +28,6 @@ class LLRTIOOut(AutoDB):
|
||||||
|
|
||||||
:param t: timestamp in RTIO cycles (64-bit integer).
|
:param t: timestamp in RTIO cycles (64-bit integer).
|
||||||
:param value: value to set at the output.
|
:param value: value to set at the output.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
syscall("rtio_set_o", t, self.channel, value)
|
syscall("rtio_set_o", t, self.channel, value)
|
||||||
|
|
||||||
|
@ -38,7 +36,6 @@ class LLRTIOOut(AutoDB):
|
||||||
"""Turns the RTIO channel on.
|
"""Turns the RTIO channel on.
|
||||||
|
|
||||||
:param t: timestamp in RTIO cycles (64-bit integer).
|
:param t: timestamp in RTIO cycles (64-bit integer).
|
||||||
|
|
||||||
"""
|
"""
|
||||||
self.set_o(t, 1)
|
self.set_o(t, 1)
|
||||||
|
|
||||||
|
@ -47,7 +44,6 @@ class LLRTIOOut(AutoDB):
|
||||||
"""Turns the RTIO channel off.
|
"""Turns the RTIO channel off.
|
||||||
|
|
||||||
:param t: timestamp in RTIO cycles (64-bit integer).
|
:param t: timestamp in RTIO cycles (64-bit integer).
|
||||||
|
|
||||||
"""
|
"""
|
||||||
self.set_o(t, 0)
|
self.set_o(t, 0)
|
||||||
|
|
||||||
|
@ -65,7 +61,6 @@ class RTIOOut(AutoDB):
|
||||||
|
|
||||||
:param core: core device
|
:param core: core device
|
||||||
:param channel: channel number
|
:param channel: channel number
|
||||||
|
|
||||||
"""
|
"""
|
||||||
class DBKeys:
|
class DBKeys:
|
||||||
core = Device()
|
core = Device()
|
||||||
|
@ -107,9 +102,7 @@ class RTIOOut(AutoDB):
|
||||||
|
|
||||||
@kernel
|
@kernel
|
||||||
def pulse(self, duration):
|
def pulse(self, duration):
|
||||||
"""Pulses the output high for the specified duration.
|
"""Pulses the output high for the specified duration."""
|
||||||
|
|
||||||
"""
|
|
||||||
self.on()
|
self.on()
|
||||||
delay(duration)
|
delay(duration)
|
||||||
self.off()
|
self.off()
|
||||||
|
@ -144,18 +137,14 @@ class RTIOIn(AutoDB):
|
||||||
|
|
||||||
@kernel
|
@kernel
|
||||||
def gate_rising(self, duration):
|
def gate_rising(self, duration):
|
||||||
"""Register rising edge events for the specified duration.
|
"""Register rising edge events for the specified duration."""
|
||||||
|
|
||||||
"""
|
|
||||||
self._set_sensitivity(1)
|
self._set_sensitivity(1)
|
||||||
delay(duration)
|
delay(duration)
|
||||||
self._set_sensitivity(0)
|
self._set_sensitivity(0)
|
||||||
|
|
||||||
@kernel
|
@kernel
|
||||||
def gate_falling(self, duration):
|
def gate_falling(self, duration):
|
||||||
"""Register falling edge events for the specified duration.
|
"""Register falling edge events for the specified duration."""
|
||||||
|
|
||||||
"""
|
|
||||||
self._set_sensitivity(2)
|
self._set_sensitivity(2)
|
||||||
delay(duration)
|
delay(duration)
|
||||||
self._set_sensitivity(0)
|
self._set_sensitivity(0)
|
||||||
|
@ -163,9 +152,7 @@ class RTIOIn(AutoDB):
|
||||||
@kernel
|
@kernel
|
||||||
def gate_both(self, duration):
|
def gate_both(self, duration):
|
||||||
"""Register both rising and falling edge events for the specified
|
"""Register both rising and falling edge events for the specified
|
||||||
duration.
|
duration."""
|
||||||
|
|
||||||
"""
|
|
||||||
self._set_sensitivity(3)
|
self._set_sensitivity(3)
|
||||||
delay(duration)
|
delay(duration)
|
||||||
self._set_sensitivity(0)
|
self._set_sensitivity(0)
|
||||||
|
@ -173,9 +160,7 @@ class RTIOIn(AutoDB):
|
||||||
@kernel
|
@kernel
|
||||||
def count(self):
|
def count(self):
|
||||||
"""Poll the RTIO input during all the previously programmed gate
|
"""Poll the RTIO input during all the previously programmed gate
|
||||||
openings, and returns the number of registered events.
|
openings, and returns the number of registered events."""
|
||||||
|
|
||||||
"""
|
|
||||||
count = 0
|
count = 0
|
||||||
while syscall("rtio_get", self.channel, self.previous_timestamp) >= 0:
|
while syscall("rtio_get", self.channel, self.previous_timestamp) >= 0:
|
||||||
count += 1
|
count += 1
|
||||||
|
@ -187,7 +172,6 @@ class RTIOIn(AutoDB):
|
||||||
the gating.
|
the gating.
|
||||||
|
|
||||||
If the gate is permanently closed, returns a negative value.
|
If the gate is permanently closed, returns a negative value.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return cycles_to_time(syscall("rtio_get", self.channel,
|
return cycles_to_time(syscall("rtio_get", self.channel,
|
||||||
self.previous_timestamp))
|
self.previous_timestamp))
|
||||||
|
|
Loading…
Reference in New Issue