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_FASTCALL
66 #define CC_CONF_VA_ARGS 1
67 #define CC_CONF_INLINE inline
68 
69 #define CCIF
70 #define CLIF
71 
72 typedef unsigned short uip_stats_t;
73 
74 #define UART1_CONF_TX_WITH_INTERRUPT 0
75 #define WITH_SERIAL_LINE_INPUT 1
76 
77 /* rtimer_second = 11719 */
78 #define RT_CONF_RESOLUTION 2
79 
80 /* A trick to resolve a compilation error with IAR. */
81 #ifdef __ICCARM__
82 #define UIP_CONF_DS6_AADDR_NBU 1
83 #endif
84 
85 typedef unsigned long clock_time_t;
86 
87 #define CLOCK_CONF_SECOND 1000
88 
89 typedef unsigned long rtimer_clock_t;
90 
91 #define RTIMER_CLOCK_LT(a,b) ((signed long)((a)-(b)) < 0)
92 
93 #define LEDS_CONF_RED_PIN boardDescription->io->leds[1].gpioPin
94 #define LEDS_CONF_GREEN_PIN boardDescription->io->leds[0].gpioPin
95 #define LEDS_CONF_PORT boardDescription->io->leds[1].gpioPort
96 
97 #define LEDS_CONF_RED (1<<LEDS_CONF_RED_PIN)
98 #define LEDS_CONF_GREEN (1<<LEDS_CONF_GREEN_PIN)
99 
100 #define UIP_ARCH_ADD32 1
101 #define UIP_ARCH_CHKSUM 0
102 
103 #define UIP_CONF_BYTE_ORDER UIP_LITTLE_ENDIAN
104 #define EEPROM_CONF_SIZE 8000
105 
106 #endif /* PLATFORM_CONF_H_ */
107 /** @} */
108 /** @} */