frac32.positive led1
frac32.positive led2
frac32.positive led3
frac32.positive led4
None
text script
int32_t led1, led2, led3, led4;
attr_script msg_t ThreadX2() {
setup();
while (!chThdShouldTerminate()) {
loop();
chThdSleepMilliseconds(1);
}
chThdExit((msg_t)0);
}
static msg_t ThreadX(void *arg) { ((attr_parent *)arg)->ThreadX2(); }
WORKING_AREA(waThreadX, 1024);
Thread *Thd;
led1 = 0;
led2 = 0;
led3 = 0;
led4 = 0;
Thd = chThdCreateStatic(waThreadX, sizeof(waThreadX), NORMALPRIO, ThreadX,
(void *)this);
this->led1 = inlet_led1;
this->led2 = inlet_led2;
this->led3 = inlet_led3;
this->led4 = inlet_led4;
chThdTerminate(Thd);
chThdWait(Thd);