bool32.rising trigger
bool32.rising rst
bool32.pulse o1
bool32.pulse o2
int ntrig;
int p_set;
int p_reset;
int op;
int rst;
p_set = 0;
p_reset = 0;
op = 0;
outlet_o1 = 0;
outlet_o2 = 0;
if ((inlet_trig && !ntrig) && !op) {
ntrig = 1;
outlet_o1 = 1 << 27;
op = 1;
}
if ((inlet_trig && !ntrig) && op) {
ntrig = 1;
outlet_o2 = 1 << 27;
op = 0;
}
if (!inlet_trig)
ntrig = 0;
if (inlet_rst && !rst) {
op = 0;
rst = 1;
}
if (!inlet_rst)
rst = 0;