frac32 control
bool32 c1
bool32 c2
bool32 c3
bool32 c4
frac32 1
frac32 2
frac32 3
frac32 4
int32_t A[4];
int32_t prev;
int use[4];
use[0] = inlet_c1;
use[1] = inlet_c2;
use[2] = inlet_c3;
use[3] = inlet_c4;
int i;
int32_t diff = inlet_control - prev;
for (i = 0; i < 4; i++) {
if (use[i] > 0) {
A[i] = __USAT(A[i] + diff, 27);
}
}
prev = inlet_control;
outlet_1 = A[0];
outlet_2 = A[1];
outlet_3 = A[2];
outlet_4 = A[3];