changeset 21:8d759cf5a9e7

Load correct program, use a separate IRQ
author Daniel O'Connor <darius@dons.net.au>
date Tue, 25 Feb 2025 15:46:32 +1030
parents 6aaa9658df1e
children 9ad0dd5c638c
files ctrl.pio
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ctrl.pio	Tue Feb 25 15:46:03 2025 +1030
+++ b/ctrl.pio	Tue Feb 25 15:46:32 2025 +1030
@@ -3,12 +3,11 @@
 ;
 
 .program ctrl
-.define TRIGGER_IRQ 0
+.define TRIGGER_IRQ 1
 ; Assert all 0s
     mov pins, null
 ; Wait for start trigger and clear IRQ
     wait 1 irq TRIGGER_IRQ
-    irq clear TRIGGER_IRQ
 .wrap_target
     out pins 8
     nop
@@ -22,7 +21,7 @@
 
 % c-sdk {
 static inline void ctrl_program_init(PIO pio, uint sm, uint offset, uint pin, uint clkdiv) {
-    pio_sm_config c = dac_program_get_default_config(offset);
+    pio_sm_config c = ctrl_program_get_default_config(offset);
 
     // Set the OUT base pin to the provided `pin` parameter.
     // Note: We only need 6 pins but pull a byte at a time to make