From bd6222dbaf8174d969a53f299e0f9e2eda454f47 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 30 Jul 2020 22:25:14 +0800 Subject: [PATCH] fix DMA example --- examples/dma.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/dma.py b/examples/dma.py index ce93580c..930966fe 100644 --- a/examples/dma.py +++ b/examples/dma.py @@ -8,11 +8,12 @@ class DMAPulses(EnvExperiment): @kernel def record(self): - with self.core_dma.record("pulses"): - # all RTIO operations now go to the "pulses" + with self.core_dma.record("pulse"): + delay(200*ms) + # all RTIO operations now go to the "pulse" # DMA buffer, instead of being executed immediately. - self.led0.pulse(100*ns) - delay(100*ns) + self.led0.pulse(500*ms) + @kernel def run(self): @@ -20,7 +21,6 @@ class DMAPulses(EnvExperiment): self.record() # prefetch the address of the DMA buffer # for faster playback trigger - pulses_handle = self.core_dma.get_handle("pulses") + pulse_handle = self.core_dma.get_handle("pulse") self.core.break_realtime() - self.core_dma.playback_handle(pulses_handle) - + self.core_dma.playback_handle(pulse_handle)