Mercurial > ~darius > hgwebdir.cgi > modulator
comparison modulator.c @ 25:6070d2e66b4c
Cascade IRQs from DAC to control so manual & external trigger are the same.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Tue, 25 Feb 2025 16:53:32 +1030 |
parents | c7845db23ab2 |
children | 336f06fa6e47 |
comparison
equal
deleted
inserted
replaced
24:c7845db23ab2 | 25:6070d2e66b4c |
---|---|
14 ** MODULATOR.C | 14 ** MODULATOR.C |
15 ** | 15 ** |
16 ** Create modulation shape | 16 ** Create modulation shape |
17 ** | 17 ** |
18 */ | 18 */ |
19 #define WITH_TRIGGER | 19 //#define WITH_TRIGGER |
20 | 20 |
21 #include <stdio.h> | 21 #include <stdio.h> |
22 #include <string.h> | 22 #include <string.h> |
23 | 23 |
24 #pragma GCC diagnostic push | 24 #pragma GCC diagnostic push |
123 void | 123 void |
124 pwm_wrap(void) { | 124 pwm_wrap(void) { |
125 pwm_clear_irq(slice_num); | 125 pwm_clear_irq(slice_num); |
126 | 126 |
127 #ifndef WITH_TRIGGER | 127 #ifndef WITH_TRIGGER |
128 // Manually trigger DAQ SM (cleared by SM) | 128 // Manually trigger DAC SM (cleared by SM) |
129 pulse_pio->irq_force = 3; | 129 pulse_pio->irq_force = 1; |
130 | 130 |
131 // 'scope trigger | 131 // 'scope trigger |
132 gpio_put(2, 1); | 132 gpio_put(2, 1); |
133 gpio_put(2, 0); | 133 gpio_put(2, 0); |
134 #endif | 134 #endif |