Fixed function prototypes to match radio API

This commit is contained in:
adamdunkels 2007-11-19 09:50:54 +00:00
parent 476848fbe0
commit 477d39ce5b
2 changed files with 8 additions and 8 deletions

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* @(#)$Id: tr1001-gcr.c,v 1.10 2007/10/25 09:30:39 adamdunkels Exp $
* @(#)$Id: tr1001-gcr.c,v 1.11 2007/11/19 09:50:54 adamdunkels Exp $
*/
/**
* \addtogroup esb
@ -645,7 +645,7 @@ prepare_transmission(int synchbytes)
}
/*---------------------------------------------------------------------------*/
int
tr1001_send(const u8_t *packet, u16_t len)
tr1001_send(const void *packet, unsigned short len)
{
int i;
u16_t crc16;
@ -671,7 +671,7 @@ tr1001_send(const u8_t *packet, u16_t len)
/* Send packet data. */
for(i = 0; i < len; ++i) {
crc16 = sendx_crc16(packet[i], crc16);
crc16 = sendx_crc16(((u8_t *)packet)[i], crc16);
}
/* Send CRC */
@ -705,8 +705,8 @@ tr1001_send(const u8_t *packet, u16_t len)
return 0;
}
/*---------------------------------------------------------------------------*/
u16_t
tr1001_read(u8_t *buf, u16_t bufsize)
int
tr1001_read(void *buf, unsigned short bufsize)
{
unsigned short tmplen;

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* @(#)$Id: tr1001.h,v 1.5 2007/08/07 11:11:20 nifi Exp $
* @(#)$Id: tr1001.h,v 1.6 2007/11/19 09:50:54 adamdunkels Exp $
*/
#ifndef __TR1001_H__
#define __TR1001_H__
@ -114,7 +114,7 @@ void tr1001_set_numrexmit(unsigned char acks);
* This function should normally not be called from user
* programs. Rather, the uIP TCP/IP stack should be used.
*/
int tr1001_send(const u8_t *packet, u16_t len);
int tr1001_send(const void *packet, unsigned short len);
/**
* Check if an incoming packet has been received.
@ -126,7 +126,7 @@ int tr1001_send(const u8_t *packet, u16_t len);
* \return The length of the received packet, or 0 if no packet has
* been received.
*/
u16_t tr1001_read(u8_t *buf, u16_t bufsize);
int tr1001_read(void *buf, unsigned short bufsize);
extern unsigned char tr1001_rxbuf[];
extern volatile unsigned char tr1001_rxstate;