bool32.rising trigger
int32 start
int32 step
int32.positive MaxCount
bool32 c
int32 output
int ntrig;
int rtrig;
int32_t count;
count = 0;
ntrig = 0;
rtrig = 0;
int c = 0;
if ((inlet_trig > 0) && !ntrig) {
int Max = inlet_MaxCount;
count += inlet_step;
if (count >= Max) {
count -= Max;
c = 1;
}
ntrig = 1;
} else if (!(inlet_trig > 0))
ntrig = 0;
outlet_o = count + inlet_start;
outlet_c = c;