Contiki 3.x
platform-conf.h
Go to the documentation of this file.
1 /**
2  * \addtogroup platform
3  * @{ */
4 /**
5  * \defgroup mbxxx-platform The STM32W MBXXX platform
6  *
7  * The STM32W MBXXX platform.
8  *
9  * @{
10  */
11 
12 /*
13  * Copyright (c) 2010, STMicroelectronics.
14  * All rights reserved.
15  *
16  * Redistribution and use in source and binary forms, with or without
17  * modification, are permitted provided that the following conditions
18  * are met:
19  * 1. Redistributions of source code must retain the above copyright
20  * notice, this list of conditions and the following disclaimer.
21  * 2. Redistributions in binary form must reproduce the above
22  * copyright notice, this list of conditions and the following
23  * disclaimer in the documentation and/or other materials provided
24  * with the distribution.
25  * 3. The name of the author may not be used to endorse or promote
26  * products derived from this software without specific prior
27  * written permission.
28  *
29  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
30  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
31  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
33  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
35  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
36  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
37  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
38  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
39  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40  *
41  * This file is part of the Contiki OS
42  *
43  */
44 /*---------------------------------------------------------------------------*/
45 /**
46 * \file
47 * Platform-conf.h for MBXXX.
48 * \author
49 * Stefano Pascali <stefano.pascali@st.com>
50 * Marco Grella <marco.grella@st.com>
51 */
52 /*---------------------------------------------------------------------------*/
53 
54 #ifndef PLATFORM_CONF_H_
55 #define PLATFORM_CONF_H_
56 
57 #include PLATFORM_HEADER
58 
59 #include <inttypes.h>
60 #include <string.h> // For memcpm().
61 
62 /* Platform-dependent definitions */
63 #define CC_CONF_REGISTER_ARGS 0
64 #define CC_CONF_FUNCTION_POINTER_ARGS 1
65 #define CC_CONF_VA_ARGS 1
66 #define CC_CONF_INLINE inline
67 
68 #define CCIF
69 #define CLIF
70 
71 typedef unsigned short uip_stats_t;
72 
73 #define UART1_CONF_TX_WITH_INTERRUPT 0
74 #define WITH_SERIAL_LINE_INPUT 1
75 
76 /* rtimer_second = 11719 */
77 #define RT_CONF_RESOLUTION 2
78 
79 /* A trick to resolve a compilation error with IAR. */
80 #ifdef __ICCARM__
81 #define UIP_CONF_DS6_AADDR_NBU 1
82 #endif
83 
84 typedef unsigned long clock_time_t;
85 
86 #define CLOCK_CONF_SECOND 1000
87 
88 typedef unsigned long rtimer_clock_t;
89 
90 #define RTIMER_CLOCK_DIFF(a,b) ((signed long)((a)-(b)))
91 
92 #define LEDS_CONF_RED_PIN boardDescription->io->leds[1].gpioPin
93 #define LEDS_CONF_GREEN_PIN boardDescription->io->leds[0].gpioPin
94 #define LEDS_CONF_PORT boardDescription->io->leds[1].gpioPort
95 
96 #define LEDS_CONF_RED (1<<LEDS_CONF_RED_PIN)
97 #define LEDS_CONF_GREEN (1<<LEDS_CONF_GREEN_PIN)
98 
99 #define UIP_ARCH_ADD32 1
100 #define UIP_ARCH_CHKSUM 0
101 
102 #define UIP_CONF_BYTE_ORDER UIP_LITTLE_ENDIAN
103 #define EEPROM_CONF_SIZE 8000
104 
105 #endif /* PLATFORM_CONF_H_ */
106 /** @} */
107 /** @} */