bool32 led1
frac32 x
frac32 y
bool32 s
frac32.u.dial x
frac32.u.dial y
bool32 s
static const unsigned int SIZE = 2;
static const int32_t F_FREQ = 1 << 23;
int32_t o[SIZE];
int i;
for (i = 0; i < SIZE; i++) {
o[i] = 0;
}
palSetPadMode(GPIOC, 0, PAL_MODE_INPUT_PULLDOWN);
palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL);
int i = 0;
for (int i = 0; i < SIZE; i++) {
o[i] = ___SMMLA(((adcvalues[i + 0] << 15) - o[i]) << 1, F_FREQ, o[i]);
}
outlet_x = o[1];
outlet_y = o[0];
int32_t s = palReadPad(GPIOC, 0);
palWritePad(GPIOB, 0, (inlet_led1 > 0));
disp_x = o[1];
disp_y = o[0];
disp_s = s;
outlet_s = s;