updated interface

This commit is contained in:
fros4943 2007-11-25 22:44:06 +00:00
parent 9c5f62d361
commit 4436819336
3 changed files with 11 additions and 12 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: cfs-cooja.c,v 1.5 2007/11/17 18:28:23 adamdunkels Exp $ * $Id: cfs-cooja.c,v 1.6 2007/11/25 22:44:06 fros4943 Exp $
*/ */
#include <string.h> #include <string.h>
#include "lib/simEnvChange.h" #include "lib/simEnvChange.h"
@ -102,7 +102,7 @@ cfs_write(int f, void *buf, unsigned int len)
} }
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
int unsigned int
cfs_seek(int f, unsigned int o) cfs_seek(int f, unsigned int o)
{ {
if(f == FLAG_FILE_OPEN) { if(f == FLAG_FILE_OPEN) {
@ -125,10 +125,9 @@ cfs_readdir(struct cfs_dir *p, struct cfs_dirent *e)
return 1; return 1;
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
int void
cfs_closedir(struct cfs_dir *p) cfs_closedir(struct cfs_dir *p)
{ {
return 1;
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static void static void

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id: cooja-radio.c,v 1.5 2007/08/21 13:09:40 fros4943 Exp $ * $Id: cooja-radio.c,v 1.6 2007/11/25 22:44:40 fros4943 Exp $
*/ */
#include <string.h> #include <string.h>
@ -156,8 +156,8 @@ doInterfaceActionsBeforeTick(void)
} }
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
u16_t int
radio_read(u8_t *buf, u16_t bufsize) radio_read(void *buf, unsigned short bufsize)
{ {
int tmpInSize = simInSize; int tmpInSize = simInSize;
if(simInSize > 0) { if(simInSize > 0) {
@ -180,7 +180,7 @@ doInterfaceActionsAfterTick(void)
} }
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
int int
radio_send(const u8_t *payload, u16_t payload_len) radio_send(const void *payload, unsigned short payload_len)
{ {
/* If radio already actively transmitting, drop packet*/ /* If radio already actively transmitting, drop packet*/
if(inSendFunction) { if(inSendFunction) {

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: cooja-radio.h,v 1.3 2007/08/21 13:09:40 fros4943 Exp $ * $Id: cooja-radio.h,v 1.4 2007/11/25 22:44:40 fros4943 Exp $
*/ */
#ifndef __COOJA_RADIO_H__ #ifndef __COOJA_RADIO_H__
@ -87,7 +87,7 @@ radio_set_txpower(unsigned char p);
* Send a packet from the given buffer with the given length. * Send a packet from the given buffer with the given length.
*/ */
int int
radio_send(const u8_t *payload, u16_t payload_len); radio_send(const void *payload, unsigned short payload_len);
/** /**
* Check if an incoming packet has been received. * Check if an incoming packet has been received.
@ -98,8 +98,8 @@ radio_send(const u8_t *payload, u16_t payload_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 int
radio_read(u8_t *buf, u16_t bufsize); radio_read(void *buf, unsigned short bufsize);
/** /**
* This function returns the signal strength of the last * This function returns the signal strength of the last