axocontrol

exposes the controls of the MTM axocontrol board
Author: a773
License: GPL
Github: a773/axocontrol.axo

Inlets

bool32 PB0

bool32 PB1

bool32 PB8

bool32 PB9

Outlets

frac32.bipolar joyx

frac32.bipolar joyy

bool32 joyPress

bool32 buttonA

bool32 buttonB

bool32 buttonC

frac32.positive knob1

frac32.positive knob2

frac32.positive knob3

frac32.positive knob4

frac32.positive knob5

frac32.positive knob6

Init
palSetPadMode(GPIOC, 0, PAL_MODE_INPUT_PULLDOWN);
palSetPadMode(GPIOC, 1, PAL_MODE_INPUT_PULLDOWN);
palSetPadMode(GPIOC, 2, PAL_MODE_INPUT_PULLDOWN);
palSetPadMode(GPIOC, 3, PAL_MODE_INPUT_PULLDOWN);
palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOB, 9, PAL_MODE_OUTPUT_PUSHPULL);
Control Rate
outlet_joyy = (adcvalues[0] - 2048) << 16;
outlet_joyx = (adcvalues[1] - 2048) << 16;
outlet_joyPress = palReadPad(GPIOC, 0) << 27;
outlet_knob4 = adcvalues[2] << 15;
outlet_knob5 = adcvalues[3] << 15;
outlet_knob6 = adcvalues[4] << 15;
outlet_knob1 = adcvalues[5] << 15;
outlet_knob2 = adcvalues[6] << 15;
outlet_knob3 = adcvalues[7] << 15;
outlet_buttonA = palReadPad(GPIOC, 1) << 27;
outlet_buttonB = palReadPad(GPIOC, 2) << 27;
outlet_buttonC = palReadPad(GPIOC, 3) << 27;
palWritePad(GPIOB, 0, (inlet_PB0 > 0));
palWritePad(GPIOB, 1, (inlet_PB1 > 0));
palWritePad(GPIOB, 8, (inlet_PB8 > 0));
palWritePad(GPIOB, 9, (inlet_PB9 > 0));

Privacy

© 2024 Zrna Research