slip.c:
char is signed but uip_buf is unsigned spi.h: casted unused values to void autostart.c: autostart.h: The array itself should be const but the processes pointed to should not. profile-aggregates.c: sizeof returns unsigned long on my platform
This commit is contained in:
parent
46b6ce9193
commit
71dc988cb9
|
@ -29,7 +29,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* @(#)$Id: slip.c,v 1.4 2007/02/01 14:04:06 bg- Exp $
|
* @(#)$Id: slip.c,v 1.5 2007/11/18 12:27:44 ksb Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -228,7 +228,7 @@ PROCESS_THREAD(slip_process, ev, data)
|
||||||
uip_len = slip_poll_handler(&uip_buf[UIP_LLH_LEN],
|
uip_len = slip_poll_handler(&uip_buf[UIP_LLH_LEN],
|
||||||
UIP_BUFSIZE - UIP_LLH_LEN);
|
UIP_BUFSIZE - UIP_LLH_LEN);
|
||||||
|
|
||||||
if(uip_len == 4 && strncmp(&uip_buf[UIP_LLH_LEN], "?IPA", 4) == 0) {
|
if(uip_len == 4 && strncmp((char*)&uip_buf[UIP_LLH_LEN], "?IPA", 4) == 0) {
|
||||||
char buf[8];
|
char buf[8];
|
||||||
memcpy(&buf[0], "=IPA", 4);
|
memcpy(&buf[0], "=IPA", 4);
|
||||||
memcpy(&buf[4], &uip_hostaddr, 4);
|
memcpy(&buf[4], &uip_hostaddr, 4);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* -*- C -*- */
|
/* -*- C -*- */
|
||||||
/* @(#)$Id: spi.h,v 1.3 2007/11/13 06:45:29 fros4943 Exp $ */
|
/* @(#)$Id: spi.h,v 1.4 2007/11/18 12:27:44 ksb Exp $ */
|
||||||
|
|
||||||
#ifndef SPI_H
|
#ifndef SPI_H
|
||||||
#define SPI_H
|
#define SPI_H
|
||||||
|
@ -37,7 +37,7 @@ void spi_init(void);
|
||||||
do {\
|
do {\
|
||||||
SPI_TXBUF = 0;\
|
SPI_TXBUF = 0;\
|
||||||
SPI_WAITFOREORx();\
|
SPI_WAITFOREORx();\
|
||||||
SPI_RXBUF;\
|
(void)SPI_RXBUF;\
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
#define FASTSPI_TX_MANY(p,c)\
|
#define FASTSPI_TX_MANY(p,c)\
|
||||||
|
@ -148,7 +148,7 @@ void spi_init(void);
|
||||||
do {\
|
do {\
|
||||||
SPI_ENABLE();\
|
SPI_ENABLE();\
|
||||||
FASTSPI_RX_ADDR(CC2420_RXFIFO);\
|
FASTSPI_RX_ADDR(CC2420_RXFIFO);\
|
||||||
SPI_RXBUF;\
|
(void)SPI_RXBUF;\
|
||||||
FASTSPI_RX(b);\
|
FASTSPI_RX(b);\
|
||||||
clock_delay(1);\
|
clock_delay(1);\
|
||||||
SPI_DISABLE();\
|
SPI_DISABLE();\
|
||||||
|
@ -160,7 +160,7 @@ void spi_init(void);
|
||||||
u8_t spiCnt;\
|
u8_t spiCnt;\
|
||||||
SPI_ENABLE();\
|
SPI_ENABLE();\
|
||||||
FASTSPI_RX_ADDR(CC2420_RXFIFO);\
|
FASTSPI_RX_ADDR(CC2420_RXFIFO);\
|
||||||
SPI_RXBUF;\
|
(void)SPI_RXBUF;\
|
||||||
for (spiCnt = 0; spiCnt < (c); spiCnt++) {\
|
for (spiCnt = 0; spiCnt < (c); spiCnt++) {\
|
||||||
FASTSPI_RX(((u8_t*)(p))[spiCnt]);\
|
FASTSPI_RX(((u8_t*)(p))[spiCnt]);\
|
||||||
}\
|
}\
|
||||||
|
@ -175,7 +175,7 @@ void spi_init(void);
|
||||||
u8_t spiCnt;\
|
u8_t spiCnt;\
|
||||||
SPI_ENABLE();\
|
SPI_ENABLE();\
|
||||||
FASTSPI_RX_ADDR(CC2420_RXFIFO);\
|
FASTSPI_RX_ADDR(CC2420_RXFIFO);\
|
||||||
SPI_RXBUF;\
|
(void)SPI_RXBUF;\
|
||||||
for (spiCnt = 0; spiCnt < (c); spiCnt++) {\
|
for (spiCnt = 0; spiCnt < (c); spiCnt++) {\
|
||||||
FASTSPI_RX_GARBAGE();\
|
FASTSPI_RX_GARBAGE();\
|
||||||
}\
|
}\
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: autostart.c,v 1.2 2007/03/25 17:16:57 adamdunkels Exp $
|
* $Id: autostart.c,v 1.3 2007/11/18 12:27:45 ksb Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
autostart_start(struct process *processes[])
|
autostart_start(struct process * const processes[])
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ autostart_start(struct process *processes[])
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
autostart_exit(struct process *processes[])
|
autostart_exit(struct process * const processes[])
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: autostart.h,v 1.2 2007/08/30 14:39:17 matsutsuka Exp $
|
* $Id: autostart.h,v 1.3 2007/11/18 12:27:45 ksb Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
#if ! CC_NO_VA_ARGS
|
#if ! CC_NO_VA_ARGS
|
||||||
#if AUTOSTART_ENABLE
|
#if AUTOSTART_ENABLE
|
||||||
#define AUTOSTART_PROCESSES(...) \
|
#define AUTOSTART_PROCESSES(...) \
|
||||||
const struct process *autostart_processes[] = {__VA_ARGS__, NULL}
|
struct process * const autostart_processes[] = {__VA_ARGS__, NULL}
|
||||||
#else /* AUTOSTART_ENABLE */
|
#else /* AUTOSTART_ENABLE */
|
||||||
#define AUTOSTART_PROCESSES(...) \
|
#define AUTOSTART_PROCESSES(...) \
|
||||||
extern int _dummy
|
extern int _dummy
|
||||||
|
@ -55,9 +55,9 @@ extern int _dummy
|
||||||
#error "C compiler must support __VA_ARGS__ macro"
|
#error "C compiler must support __VA_ARGS__ macro"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern const struct process *autostart_processes[];
|
extern struct process * const autostart_processes[];
|
||||||
|
|
||||||
void autostart_start(struct process *processes[]);
|
void autostart_start(struct process * const processes[]);
|
||||||
void autostart_exit(struct process *processes[]);
|
void autostart_exit(struct process * const processes[]);
|
||||||
|
|
||||||
#endif /* __AUTOSTART_H__ */
|
#endif /* __AUTOSTART_H__ */
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: profile-aggregates.c,v 1.3 2007/11/17 18:07:40 adamdunkels Exp $
|
* $Id: profile-aggregates.c,v 1.4 2007/11/18 12:27:45 ksb Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -128,8 +128,8 @@ profile_aggregates_print(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
printf("Memory for aggregates: %d * %d = %d\n",
|
printf("Memory for aggregates: %d * %d = %d\n",
|
||||||
sizeof(struct aggregate), aggregates_list_ptr,
|
(int)sizeof(struct aggregate), aggregates_list_ptr,
|
||||||
sizeof(struct aggregate) * aggregates_list_ptr);
|
(int)sizeof(struct aggregate) * aggregates_list_ptr);
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
#if DETAILED_AGGREGATES
|
#if DETAILED_AGGREGATES
|
||||||
|
|
Loading…
Reference in a new issue