bool32.rising trigger
bool32.rising reset
bool32.rising load trigger
int32 load value
bool32 lfs pattern
combo polynomial
uint32_t state;
int ntrig;
int rtrig;
int ltrig;
state = 1;
ntrig = 0;
rtrig = 0;
ltrig = 0;
if ((inlet_trig > 0) && !ntrig) {
ntrig = 1;
if (state & 1) {
state = (state >> 1) ^ attr_polynomial;
} else {
state = (state >> 1);
}
} else if (!(inlet_trig > 0))
ntrig = 0;
if ((inlet_r > 0) && !rtrig) {
state = 1;
rtrig = 1;
} else if (!(inlet_r > 0))
rtrig = 0;
if ((inlet_load > 0) && !ltrig) {
state = inlet_lval;
ltrig = 1;
} else if (!(inlet_load > 0))
ltrig = 0;
outlet_out = state & 1;