mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-02 19:29:30 +00:00
Bugfix: didn't correctly reset the pending flag when a packet was read from the radio
This commit is contained in:
parent
80b289f7c1
commit
b9827d2b36
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* @(#)$Id: cc2420.c,v 1.40 2010/02/23 18:24:49 adamdunkels Exp $
|
* @(#)$Id: cc2420.c,v 1.41 2010/02/25 16:06:44 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* This code is almost device independent and should be easy to port.
|
* This code is almost device independent and should be easy to port.
|
||||||
@ -586,8 +586,6 @@ PROCESS_THREAD(cc2420_process, ev, data)
|
|||||||
#if CC2420_TIMETABLE_PROFILING
|
#if CC2420_TIMETABLE_PROFILING
|
||||||
TIMETABLE_TIMESTAMP(cc2420_timetable, "poll");
|
TIMETABLE_TIMESTAMP(cc2420_timetable, "poll");
|
||||||
#endif /* CC2420_TIMETABLE_PROFILING */
|
#endif /* CC2420_TIMETABLE_PROFILING */
|
||||||
|
|
||||||
pending = 0;
|
|
||||||
|
|
||||||
PRINTF("cc2420_process: calling receiver callback\n");
|
PRINTF("cc2420_process: calling receiver callback\n");
|
||||||
|
|
||||||
@ -617,13 +615,15 @@ cc2420_read(void *buf, unsigned short bufsize)
|
|||||||
uint16_t checksum;
|
uint16_t checksum;
|
||||||
#endif /* CC2420_CONF_CHECKSUM */
|
#endif /* CC2420_CONF_CHECKSUM */
|
||||||
|
|
||||||
|
pending = 0;
|
||||||
|
|
||||||
if(!FIFOP_IS_1) {
|
if(!FIFOP_IS_1) {
|
||||||
/* If FIFOP is 0, there is no packet in the RXFIFO. */
|
/* If FIFOP is 0, there is no packet in the RXFIFO. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
GET_LOCK();
|
GET_LOCK();
|
||||||
|
|
||||||
cc2420_packets_read++;
|
cc2420_packets_read++;
|
||||||
|
|
||||||
getrxbyte(&len);
|
getrxbyte(&len);
|
||||||
|
Loading…
Reference in New Issue
Block a user