this fixes a major problem with the maca_process

Before it didn't do process_poll like it should and would add events
out of turn and mess up the event processor --- that would cause the
button to stop working after the unhandled events exceeded a max
number

this fixes maca_process to do a process_poll as it should. now the
button works fine and so does the radio.
This commit is contained in:
Mariano Alvira 2011-02-03 18:09:51 -05:00
parent abe3cf57c3
commit 2a75a4a5df

View file

@ -247,7 +247,7 @@ PROCESS_THREAD(contiki_maca_process, ev, data)
PROCESS_BEGIN();
while (1) {
PROCESS_PAUSE();
PROCESS_YIELD();
/* check if there is a request to turn the radio on or off */
if(contiki_maca_request_on == 1) {
@ -274,6 +274,11 @@ PROCESS_THREAD(contiki_maca_process, ev, data)
PROCESS_END();
}
void maca_rx_callback(volatile packet_t *p __attribute((unused))) {
process_poll(&contiki_maca_process);
}
#if BLOCKING_TX
void maca_tx_callback(volatile packet_t *p __attribute((unused))) {
tx_complete = 1;