Contiki 2.6

contiki-conf.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2010, STMicroelectronics.
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above
00011  *    copyright notice, this list of conditions and the following
00012  *    disclaimer in the documentation and/or other materials provided
00013  *    with the distribution.
00014  * 3. The name of the author may not be used to endorse or promote
00015  *    products derived from this software without specific prior
00016  *    written permission.
00017  *
00018  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
00019  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00020  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
00022  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00023  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
00024  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00025  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00026  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00027  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00028  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00029  *
00030  * This file is part of the Contiki OS
00031  *
00032  * $Id: contiki-conf.h,v 1.2 2010/10/27 14:05:24 salvopitru Exp $
00033  */
00034 /*---------------------------------------------------------------------------*/
00035 /**
00036 * \file
00037 *                       contiki-conf.h for MB851.
00038 * \author
00039 *                       Salvatore Pitrulli <salvopitru@users.sourceforge.net>
00040 *                       Chi-Anh La <la@imag.fr>
00041 *     Simon Duquennoy <simonduq@sics.se>
00042 */
00043 /*---------------------------------------------------------------------------*/
00044 
00045 #ifndef __CONTIKI_CONF_H__
00046 #define __CONTIKI_CONF_H__
00047 
00048 #ifdef PLATFORM_CONF_H
00049 #include PLATFORM_CONF_H
00050 #else
00051 #include "platform-conf.h"
00052 #endif /* PLATFORM_CONF_H */
00053 
00054 /* Radio and 802.15.4 params */
00055 /* 802.15.4 radio channel */
00056 #define RF_CHANNEL                              16
00057 /* 802.15.4 PAN ID */
00058 #define IEEE802154_CONF_PANID                   0x1234
00059 /* Use EID 64, enable hardware autoack and address filtering */
00060 #define RIMEADDR_CONF_SIZE                      8
00061 #define UIP_CONF_LL_802154                      1
00062 #define ST_CONF_RADIO_AUTOACK                   1
00063 /* Number of buffers for incoming frames */
00064 #define RADIO_RXBUFS                            2
00065 /* Set to 0 for non ethernet links */
00066 #define UIP_CONF_LLH_LEN                        0
00067 
00068 /* RDC params */
00069 /* TX routine passes the cca/ack result in the return parameter */
00070 #define RDC_CONF_HARDWARE_ACK                   1
00071 /* TX routine does automatic cca and optional backoff */
00072 #define RDC_CONF_HARDWARE_CSMA                  0
00073 /* RDC debug with LED */
00074 #define RDC_CONF_DEBUG_LED                      1
00075 /* Channel check rate (per second) */
00076 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE    8
00077 /* Use ACK for optimization (LPP, XMAC) */
00078 #define WITH_ACK_OPTIMIZATION                   0
00079 
00080 /* Netstack config */
00081 #define NETSTACK_CONF_MAC                       csma_driver
00082 #define NETSTACK_CONF_RDC                       contikimac_driver
00083 #define NETSTACK_CONF_FRAMER                    framer_802154
00084 #define NETSTACK_CONF_RADIO                     stm32w_radio_driver
00085 
00086 /* ContikiMAC config */
00087 #define CONTIKIMAC_CONF_COMPOWER                1
00088 #define CONTIKIMAC_CONF_BROADCAST_RATE_LIMIT    0
00089 #define CONTIKIMAC_CONF_ANNOUNCEMENTS           0
00090 
00091 /* CXMAC config */
00092 #define CXMAC_CONF_ANNOUNCEMENTS                0
00093 #define CXMAC_CONF_COMPOWER                     1
00094 
00095 /* XMAC config */
00096 #define XMAC_CONF_ANNOUNCEMENTS                 0
00097 #define XMAC_CONF_COMPOWER                      1
00098 
00099 /* Other (RAM saving) */
00100 #define ENERGEST_CONF_ON                        0
00101 #define QUEUEBUF_CONF_NUM                       2
00102 #define QUEUEBUF_CONF_REF_NUM                   0
00103 #define UIP_CONF_DS6_NBR_NBU                    4
00104 #define UIP_CONF_DS6_ROUTE_NBU                  4
00105 #define RPL_CONF_MAX_PARENTS_PER_DAG            4
00106 #define RPL_CONF_MAX_INSTANCES                  1
00107 #define RPL_CONF_MAX_DAG_PER_INSTANCE           1
00108 #define PROCESS_CONF_NUMEVENTS                  16
00109 
00110 #if WITH_UIP6
00111 
00112 /* Network setup for IPv6 */
00113 #define NETSTACK_CONF_NETWORK sicslowpan_driver
00114 
00115 /* Specify a minimum packet size for 6lowpan compression to be
00116    enabled. This is needed for ContikiMAC, which needs packets to be
00117    larger than a specified size, if no ContikiMAC header should be
00118    used. */
00119 #define SICSLOWPAN_CONF_COMPRESSION_THRESHOLD   63
00120 #define CONTIKIMAC_CONF_WITH_CONTIKIMAC_HEADER  0
00121 
00122 #define UIP_CONF_ROUTER                                           1
00123 #define UIP_CONF_IPV6_RPL                                         1
00124 #define UIP_CONF_ND6_SEND_RA                                  0
00125 
00126 #define UIP_CONF_IPV6                                               1
00127 #define UIP_CONF_IPV6_QUEUE_PKT                             0
00128 #define UIP_CONF_IPV6_CHECKS                                  1
00129 #define UIP_CONF_IPV6_REASSEMBLY                            0
00130 #define UIP_CONF_ND6_MAX_PREFIXES                           2
00131 #define UIP_CONF_ND6_MAX_NEIGHBORS                        2
00132 #define UIP_CONF_ND6_MAX_DEFROUTERS                       1
00133 #define UIP_CONF_IP_FORWARD                                     0
00134 #define UIP_CONF_BUFFER_SIZE                                  140
00135 #define UIP_CONF_MAX_CONNECTIONS                            4
00136 #define UIP_CONF_MAX_LISTENPORTS                            8
00137 #define UIP_CONF_UDP_CONNS                                      4
00138 
00139 #define SICSLOWPAN_CONF_COMPRESSION             SICSLOWPAN_COMPRESSION_HC06
00140 #ifndef SICSLOWPAN_CONF_FRAG
00141 #define SICSLOWPAN_CONF_FRAG                    1
00142 #endif /* SICSLOWPAN_CONF_FRAG */
00143 #ifndef SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS
00144 #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS       2
00145 #endif /* SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS */
00146 #ifndef SICSLOWPAN_CONF_MAXAGE
00147 #define SICSLOWPAN_CONF_MAXAGE                  2
00148 #endif /* SICSLOWPAN_CONF_MAXAGE */
00149 
00150 #else /* WITH_UIP6 */
00151 
00152 /* Network setup for non-IPv6 (rime). */
00153 #define NETSTACK_CONF_NETWORK rime_driver
00154 
00155 #endif /* WITH_UIP6 */
00156 
00157 #ifdef PROJECT_CONF_H
00158 #include PROJECT_CONF_H
00159 #endif /* PROJECT_CONF_H */
00160 
00161 #endif /* __CONTIKI_CONF_H__ */