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 */
00041 /*---------------------------------------------------------------------------*/
00042 
00043 
00044 #ifndef __CONTIKI_CONF_H__
00045 #define __CONTIKI_CONF_H__
00046 
00047 #include PLATFORM_HEADER
00048 
00049 #include <inttypes.h>
00050 #include <string.h>  // For memcpm().
00051 
00052 #define CC_CONF_REGISTER_ARGS          0
00053 #define CC_CONF_FUNCTION_POINTER_ARGS  1
00054 #define CC_CONF_FASTCALL
00055 #define CC_CONF_VA_ARGS                1
00056 #define CC_CONF_INLINE                 inline
00057 
00058 #define CCIF
00059 #define CLIF
00060 
00061 typedef uint8_t   u8_t;
00062 typedef uint16_t u16_t;
00063 typedef uint32_t u32_t;
00064 typedef  int32_t s32_t;
00065 typedef unsigned short uip_stats_t;
00066 
00067 
00068 //#define FIXED_NET_ADDRESS             1
00069 //#define NET_ADDR_A                    0x2001
00070 //#define NET_ADDR_B                    0xdb8
00071 //#define NET_ADDR_C                    0xbbbb
00072 //#define NET_ADDR_D                    0xabcd
00073 
00074 #define UART1_CONF_TX_WITH_INTERRUPT            0
00075 #define WITH_SERIAL_LINE_INPUT                  1
00076 #define ENERGEST_CONF_ON                        0
00077 #define TELNETD_CONF_NUMLINES                   6
00078 
00079 #define QUEUEBUF_CONF_NUM                       2       
00080 
00081 
00082 #define NETSTACK_CONF_RADIO             stm32w_radio_driver
00083 
00084 #if WITH_UIP6
00085 
00086 /* No radio cycling */
00087 #define NETSTACK_CONF_NETWORK           sicslowpan_driver
00088 #define NETSTACK_CONF_MAC               nullmac_driver
00089 #define NETSTACK_CONF_RDC               sicslowmac_driver
00090 #define NETSTACK_CONF_FRAMER            framer_802154
00091 
00092 #define RIMEADDR_CONF_SIZE              8
00093 #define UIP_CONF_LL_802154              1
00094 
00095 #define UIP_CONF_ROUTER                         1
00096 #define UIP_CONF_IPV6_RPL                       1
00097 #define UIP_CONF_ND6_SEND_RA                    0
00098 //#define RPL_BORDER_ROUTER                     0
00099 
00100 /* A trick to resolve a compilation error with IAR. */
00101 #ifdef __ICCARM__
00102 #define UIP_CONF_DS6_AADDR_NBU                  1
00103 #endif
00104 
00105 #define UIP_CONF_IPV6                           1
00106 #define UIP_CONF_IPV6_QUEUE_PKT                 0   // This is a very costly feature as it increases the RAM usage by approximately UIP_ND6_MAX_NEIGHBORS * UIP_LINK_MTU bytes.
00107 #define UIP_CONF_IPV6_CHECKS                    1
00108 #define UIP_CONF_IPV6_REASSEMBLY                0
00109 #define UIP_CONF_ND6_MAX_PREFIXES               2
00110 #define UIP_CONF_ND6_MAX_NEIGHBORS              2
00111 #define UIP_CONF_ND6_MAX_DEFROUTERS             1
00112 #define UIP_CONF_IP_FORWARD                     0
00113 #define UIP_CONF_BUFFER_SIZE                    140
00114 #define UIP_CONF_MAX_CONNECTIONS                6
00115 #define UIP_CONF_MAX_LISTENPORTS                6
00116 #define UIP_CONF_UDP_CONNS                      3
00117 
00118 #define SICSLOWPAN_CONF_COMPRESSION_IPV6        0
00119 #define SICSLOWPAN_CONF_COMPRESSION_HC1         1
00120 #define SICSLOWPAN_CONF_COMPRESSION_HC06        2
00121 #define SICSLOWPAN_CONF_COMPRESSION             SICSLOWPAN_CONF_COMPRESSION_HC06
00122 #define SICSLOWPAN_CONF_FRAG                    1
00123 #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS       2
00124 #define SICSLOWPAN_CONF_MAXAGE                  2
00125 
00126 #define UIP_CONF_ICMP6                          0
00127 #endif /* WITH_UIP6 */
00128 
00129 #define UIP_CONF_UDP                            1
00130 #define UIP_CONF_TCP                            1
00131 
00132 #define IEEE802154_CONF_PANID           0x1234
00133 #define STM32W_NODE_ID                  0x5678   // to be deleted
00134 #define RF_CHANNEL                      16
00135 #define RADIO_RXBUFS                    2   // Set to a number greater than 1 to decrease packet loss probability at high rates (e.g, with fragmented packets)
00136 #define UIP_CONF_LLH_LEN                0
00137 
00138 typedef unsigned long clock_time_t;
00139 
00140 #define CLOCK_CONF_SECOND 1000
00141 
00142 typedef unsigned long long rtimer_clock_t;
00143 #define RTIMER_CLOCK_LT(a,b)     ((signed short)((a)-(b)) < 0)
00144 
00145 /* LEDs ports MB851 */
00146 #define LEDS_CONF_RED                   0x20
00147 #define LEDS_CONF_GREEN                 0x40
00148 #define LEDS_PORT                       GPIO_PBOUT
00149 // Open drain
00150 #define LED_CONFIG()    GPIO_PBCFGH |= 0x0550;   \
00151                         GPIO_PBCFGH &= 0xf55f
00152 
00153 
00154 #define UIP_ARCH_ADD32           1
00155 #define UIP_ARCH_CHKSUM          0
00156 
00157 #define UIP_CONF_BYTE_ORDER      UIP_LITTLE_ENDIAN
00158 
00159 
00160 #ifdef PROJECT_CONF_H
00161 #include PROJECT_CONF_H
00162 #endif /* PROJECT_CONF_H */
00163 
00164 
00165 #endif /* __CONTIKI_CONF_H__ */

Generated on Mon Apr 11 14:23:41 2011 for Contiki 2.5 by  doxygen 1.6.1