I am testing simplest ever Crossworks CTL examples for builtin multi
tasking.
When I went through test 2 for Olimex(LPC2138), I found that button ISR
once energized never stops.I think, that button press event should be
generated only once, when button is pressed ( I am not certain if LPC is
working based on Edge or Level interrupt signal)
Example code as follows:
void
buttonPressedISR(void)
{
count++;
SetLeds(1);
ctl_events_set_clear(&e1, 1, 0);
}
Below is a task which is wating for above event:
void
other(void *p)
{
unsigned leds = 0;
while (1)
{
ctl_events_wait(CTL_EVENT_WAIT_ALL_EVENTS, &e1, 1, 1,
ctl_get_current_time()+1000);
ctl_events_set_clear(&e1, 0, 1);
leds ^= 0xFFFFFFFF;
SetLeds(leds);
}
}Message
Corssworks CTL examples
2005-10-17 by rseku
Attachments
- No local attachments were found for this message.