Code: Select all
static WORKING_AREA(blinkLeftThreadWorkingArea, 1024);
static msg_t blinkLeftThread(void *param) {
blinkerLeftThread = chThdSelf();
chEvtWaitAny((eventmask_t)1);
//some code doing stuff
return;
}
void startBlinkerLeft(){
blinkThreadLeft=true;
chThdCreateStatic(blinkLeftThreadWorkingArea, sizeof(blinkLeftThreadWorkingArea), HIGHPRIO, blinkLeftThread, (void *)&blinkThreadLeft);
}
static void toggleBlinkerLeft(EXTDriver *extp, expchannel_t channel){
CH_IRQ_PROLOGUE();
chSysLockFromIsr();
chEvtSignal(blinkerLeftThread, (eventmask_t)1);
chSysUnlockFromIsr();
CH_IRQ_EPILOGUE();
}
int main(void)
{
startBlinkerLeft();
//chEvtSignal(blinkerLeftThread, (eventmask_t)1);
}
it simply does nothing, and the interrupt works if i put code in it to flash an LED.
if i commend out the 2nd line in the main the thread wakes up.
im currently working with the old chibios 2.6
please help me, its very urgent
kind regards
cheater