CC2420: Reusing getrxdata instead of getrxbyte.

This commit is contained in:
kkrentz 2013-06-06 06:54:20 -07:00
parent e977da8fe2
commit 2bac58f7b6
1 changed files with 2 additions and 8 deletions

View File

@ -322,17 +322,11 @@ getrxdata(void *buf, int len)
}
/*---------------------------------------------------------------------------*/
static void
getrxbyte(uint8_t *byte)
{
CC2420_READ_FIFO_BYTE(byte);
}
/*---------------------------------------------------------------------------*/
static void
flushrx(void)
{
uint8_t dummy;
getrxbyte(&dummy);
getrxdata(&dummy, 1);
strobe(CC2420_SFLUSHRX);
strobe(CC2420_SFLUSHRX);
if(dummy) {
@ -771,7 +765,7 @@ cc2420_read(void *buf, unsigned short bufsize)
GET_LOCK();
getrxbyte(&len);
getrxdata(&len, 1);
if(len > CC2420_MAX_PACKET_LEN) {
/* Oops, we must be out of sync. */