updated tr1001_send and tr1001_read to match radio driver api

This commit is contained in:
nifi 2008-07-08 13:22:31 +00:00
parent e92b7178b9
commit f93f501a4d
1 changed files with 6 additions and 6 deletions

View File

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* @(#)$Id: tr1001.c,v 1.10 2008/07/08 12:27:22 nifi Exp $
* @(#)$Id: tr1001.c,v 1.11 2008/07/08 13:22:31 nifi Exp $
*/
/**
* \addtogroup esb
@ -520,7 +520,7 @@ PT_THREAD(tr1001_default_rxhandler_pt(unsigned char incoming_byte))
PT_WAIT_UNTIL(&rxhandler_pt, tr1001_rxstate != RXSTATE_FULL);
} else {
LOG("Incorrect CRC");
LOG("Incorrect CRC\n");
beep_beep(1000);
RIMESTATS_ADD(badcrc);
}
@ -581,7 +581,7 @@ prepare_transmission(int synchbytes)
}
/*---------------------------------------------------------------------------*/
int
tr1001_send(const uint8_t *packet, uint16_t len)
tr1001_send(const void *packet, unsigned short len)
{
int i;
uint16_t crc16;
@ -601,7 +601,7 @@ tr1001_send(const uint8_t *packet, uint16_t len)
/* Send packet data. */
for(i = 0; i < len; ++i) {
crc16 = send2_crc16(packet[i], crc16);
crc16 = send2_crc16(((uint8_t *)packet)[i], crc16);
}
/* Send CRC */
@ -629,8 +629,8 @@ tr1001_send(const uint8_t *packet, uint16_t len)
return 0;
}
/*---------------------------------------------------------------------------*/
uint16_t
tr1001_read(uint8_t *buf, uint16_t bufsize)
int
tr1001_read(void *buf, unsigned short bufsize)
{
unsigned short tmplen;