diff --git a/apps/shell/shell-netfile.c b/apps/shell/shell-netfile.c index fc2722046..1a76bf80e 100644 --- a/apps/shell/shell-netfile.c +++ b/apps/shell/shell-netfile.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: shell-netfile.c,v 1.1 2008/02/04 23:42:17 adamdunkels Exp $ + * $Id: shell-netfile.c,v 1.2 2008/07/02 15:02:33 matsutsuka Exp $ */ /** @@ -86,14 +86,14 @@ write_chunk(struct rudolph0_conn *c, int offset, int flag, } PT_YIELD(&recvnetfilept); } while(flag != RUDOLPH0_FLAG_LASTCHUNK); - + shell_output(&recvnetfile_command, data, datalen, "", 0); printf("write_chunk wrote %d bytes at %d\n", datalen, offset); shell_output(&recvnetfile_command, "", 0, "", 0); leds_off(LEDS_YELLOW); receiving_file = 0; process_post(&shell_recvnetfile_process, PROCESS_EVENT_CONTINUE, NULL); - + PT_END(&recvnetfilept); } @@ -102,7 +102,7 @@ read_chunk(struct rudolph0_conn *c, int offset, uint8_t *to, int maxsize) { int ret; int fd; - + fd = cfs_open(filename, CFS_READ); cfs_seek(fd, offset); @@ -111,14 +111,14 @@ read_chunk(struct rudolph0_conn *c, int offset, uint8_t *to, int maxsize) cfs_close(fd); return ret; } -const static struct rudolph0_callbacks rudolph0_callbacks = +CC_CONST_FUNCTION static struct rudolph0_callbacks rudolph0_callbacks = {(void (*)(struct rudolph0_conn *, int, int, uint8_t *, int))write_chunk, read_chunk}; /*---------------------------------------------------------------------------*/ PROCESS_THREAD(shell_netfile_process, ev, data) { int fd; - + PROCESS_BEGIN(); rudolph0_send(&rudolph0_conn, CLOCK_SECOND); diff --git a/apps/shell/shell-rime-ping.c b/apps/shell/shell-rime-ping.c index acade85e7..d0c120971 100644 --- a/apps/shell/shell-rime-ping.c +++ b/apps/shell/shell-rime-ping.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: shell-rime-ping.c,v 1.2 2008/02/24 20:33:38 adamdunkels Exp $ + * $Id: shell-rime-ping.c,v 1.3 2008/07/02 15:02:33 matsutsuka Exp $ */ /** @@ -70,7 +70,7 @@ PROCESS_THREAD(shell_ping_process, ev, data) struct ping_msg *ping; const char *nextptr; char buf[32]; - + PROCESS_BEGIN(); receiver.u8[0] = shell_strtolong(data, &nextptr); @@ -84,7 +84,7 @@ PROCESS_THREAD(shell_ping_process, ev, data) snprintf(buf, sizeof(buf), "%d.%d", receiver.u8[0], receiver.u8[1]); shell_output_str(&ping_command, "Sending 4 pings to ", buf); - + for(i = 0; i < 4; ++i) { rimebuf_clear(); ping = rimebuf_dataptr(); @@ -95,7 +95,7 @@ PROCESS_THREAD(shell_ping_process, ev, data) ping->pingtime = rtimer_arch_now(); #endif mesh_send(&mesh, &receiver); - + etimer_set(&timeout, CLOCK_SECOND * 8); etimer_set(&periodic, CLOCK_SECOND * 1); waiting_for_pong = 1; @@ -125,7 +125,7 @@ recv_mesh(struct mesh_conn *c, rimeaddr_t *from, u8_t hops) rtimer_clock_t pingrecvtime; ping = rimebuf_dataptr(); - + if(waiting_for_pong == 0) { #if TIMESYNCH_CONF_ENABLED ping->pongtime = timesynch_time(); @@ -144,14 +144,14 @@ recv_mesh(struct mesh_conn *c, rimeaddr_t *from, u8_t hops) (1000L * (ping->pongtime - ping->pingtime)) / RTIMER_ARCH_SECOND, (1000L * (pingrecvtime - ping->pongtime)) / RTIMER_ARCH_SECOND, hops); - + shell_output_str(&ping_command, "Pong recived; rtt ", buf); waiting_for_pong = 0; process_post(&shell_ping_process, PROCESS_EVENT_CONTINUE, NULL); } } -const static struct mesh_callbacks mesh_callbacks = { recv_mesh, +CC_CONST_FUNCTION static struct mesh_callbacks mesh_callbacks = { recv_mesh, NULL, timedout_mesh }; /*---------------------------------------------------------------------------*/ @@ -159,7 +159,7 @@ void shell_rime_ping_init(void) { mesh_open(&mesh, 19, &mesh_callbacks); - + shell_register_command(&ping_command); } /*---------------------------------------------------------------------------*/ diff --git a/core/net/rime/chameleon-raw.c b/core/net/rime/chameleon-raw.c index 296cf09a2..182be8a3c 100644 --- a/core/net/rime/chameleon-raw.c +++ b/core/net/rime/chameleon-raw.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: chameleon-raw.c,v 1.1 2008/02/25 02:14:34 adamdunkels Exp $ + * $Id: chameleon-raw.c,v 1.2 2008/07/02 15:02:33 matsutsuka Exp $ */ /** @@ -183,4 +183,4 @@ hdrsize(const struct rimebuf_attrlist *a) return size / 8; } /*---------------------------------------------------------------------------*/ -const struct chameleon_module chameleon_raw = { input, output, hdrsize, NULL }; +CC_CONST_FUNCTION struct chameleon_module chameleon_raw = { input, output, hdrsize, NULL }; diff --git a/core/net/rime/chameleon-raw.h b/core/net/rime/chameleon-raw.h index 5e30ed36a..e0788a310 100644 --- a/core/net/rime/chameleon-raw.h +++ b/core/net/rime/chameleon-raw.h @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: chameleon-raw.h,v 1.1 2008/02/25 02:14:34 adamdunkels Exp $ + * $Id: chameleon-raw.h,v 1.2 2008/07/02 15:02:33 matsutsuka Exp $ */ /** @@ -41,6 +41,6 @@ #ifndef __CHAMELEON_RAW_H__ #define __CHAMELEON_RAW_H__ -extern const struct chameleon_module chameleon_raw; +extern CC_CONST_FUNCTION struct chameleon_module chameleon_raw; #endif /* __CHAMELEON_RAW_H__ */ diff --git a/core/net/rime/neighbor-discovery.c b/core/net/rime/neighbor-discovery.c index 85409a606..4618cf672 100644 --- a/core/net/rime/neighbor-discovery.c +++ b/core/net/rime/neighbor-discovery.c @@ -33,7 +33,7 @@ * * This file is part of the Contiki operating system. * - * $Id: neighbor-discovery.c,v 1.6 2008/06/26 11:19:22 adamdunkels Exp $ + * $Id: neighbor-discovery.c,v 1.7 2008/07/02 15:02:33 matsutsuka Exp $ */ /** @@ -124,7 +124,7 @@ static void send_timer(void *ptr) { struct neighbor_discovery_conn *tc = ptr; - + send_adv(tc, tc->max_interval); /* ctimer_set(&tc->t, MIN_INTERVAL + random_rand() % (MAX_INTERVAL - MIN_INTERVAL), @@ -136,7 +136,7 @@ send_timer(void *ptr) /*---------------------------------------------------------------------------*/ /*static const struct ibc_callbacks ibc_callbacks = {adv_packet_received};*/ -static const struct ipolite_callbacks ipolite_callbacks = +CC_CONST_FUNCTION static struct ipolite_callbacks ipolite_callbacks = {adv_packet_received}; /*---------------------------------------------------------------------------*/ void diff --git a/cpu/z80/z80def.h b/cpu/z80/z80def.h index 77934aebb..c5110dbcf 100644 --- a/cpu/z80/z80def.h +++ b/cpu/z80/z80def.h @@ -27,18 +27,18 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: z80def.h,v 1.5 2008/07/02 07:13:22 matsutsuka Exp $ + * $Id: z80def.h,v 1.6 2008/07/02 15:02:33 matsutsuka Exp $ * */ /* * \file - * This file contains a set of configuration for using SDCC as a compiler. - * + * This file contains a set of configuration for using SDCC as a compiler. + * * \author * Takahide Matsutsuka */ - + #ifndef __Z80_DEF_H__ #define __Z80_DEF_H__ @@ -69,6 +69,7 @@ typedef unsigned int size_t; /* Compiler configurations */ #define CCIF #define CLIF +#define CC_CONF_CONST_FUNCTION_BUG /* * Enable architecture-depend checksum calculation