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. * 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 * \addtogroup esb
@ -645,7 +645,7 @@ prepare_transmission(int synchbytes)
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
int int
tr1001_send(const u8_t *packet, u16_t len) tr1001_send(const void *packet, unsigned short len)
{ {
int i; int i;
u16_t crc16; u16_t crc16;
@ -671,7 +671,7 @@ tr1001_send(const u8_t *packet, u16_t len)
/* Send packet data. */ /* Send packet data. */
for(i = 0; i < len; ++i) { for(i = 0; i < len; ++i) {
crc16 = sendx_crc16(packet[i], crc16); crc16 = sendx_crc16(((u8_t *)packet)[i], crc16);
} }
/* Send CRC */ /* Send CRC */
@ -705,8 +705,8 @@ tr1001_send(const u8_t *packet, u16_t len)
return 0; return 0;
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
u16_t int
tr1001_read(u8_t *buf, u16_t bufsize) tr1001_read(void *buf, unsigned short bufsize)
{ {
unsigned short tmplen; unsigned short tmplen;

View File

@ -28,7 +28,7 @@
* *
* This file is part of the Contiki operating system. * 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__ #ifndef __TR1001_H__
#define __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 * This function should normally not be called from user
* programs. Rather, the uIP TCP/IP stack should be used. * 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. * 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 * \return The length of the received packet, or 0 if no packet has
* been received. * 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 unsigned char tr1001_rxbuf[];
extern volatile unsigned char tr1001_rxstate; extern volatile unsigned char tr1001_rxstate;