Added support for the WNC M14A2A Cellular LTE Data Module.
Dependencies: WNC14A2AInterface
platform-conf.h
00001 /** 00002 ****************************************************************************** 00003 * @file platform/stm32nucleo-spirit1/platform-conf.h 00004 * @author System LAB 00005 * @version V1.0.0 00006 * @date 17-May-2015 00007 * @brief Configuration parameters 00008 ****************************************************************************** 00009 * @attention 00010 * 00011 * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> 00012 * 00013 * Redistribution and use in source and binary forms, with or without modification, 00014 * are permitted provided that the following conditions are met: 00015 * 1. Redistributions of source code must retain the above copyright notice, 00016 * this list of conditions and the following disclaimer. 00017 * 2. Redistributions in binary form must reproduce the above copyright notice, 00018 * this list of conditions and the following disclaimer in the documentation 00019 * and/or other materials provided with the distribution. 00020 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00021 * may be used to endorse or promote products derived from this software 00022 * without specific prior written permission. 00023 * 00024 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00025 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00026 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00027 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00028 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00029 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00030 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00031 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00032 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00033 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00034 * 00035 ****************************************************************************** 00036 */ 00037 /*---------------------------------------------------------------------------*/ 00038 /** 00039 * \addtogroup stm32nucleo-spirit1 00040 * @{ 00041 * 00042 * \defgroup stm32nucleo-spirit1-peripherals User Button on STM32 Nucleo 00043 * 00044 * Defines some of the platforms capabilities 00045 * @{ 00046 * 00047 * \file 00048 * Header file for the stm32nucleo-spirit1 platform configuration 00049 */ 00050 /*---------------------------------------------------------------------------*/ 00051 #ifndef __PLATFORM_CONF_H__ 00052 #define __PLATFORM_CONF_H__ 00053 /*---------------------------------------------------------------------------*/ 00054 #ifdef USE_STM32L1XX_NUCLEO 00055 #include <inttypes.h> 00056 #include <string.h> 00057 /*---------------------------------------------------------------------------*/ 00058 #define PLATFORM_HAS_LEDS 1 00059 #define PLATFORM_HAS_BUTTON 1 00060 #define PLATFORM_HAS_RADIO 1 00061 00062 #define LEDS_GREEN 1 /*Nucleo LED*/ 00063 #define LEDS_RED 2 /*SPIRIT1 LED*/ 00064 00065 #ifdef COMPILE_SENSORS 00066 #define LEDS_CONF_ALL 1 /*Can't use SPIRIT1 LED in this case*/ 00067 #else 00068 #define LEDS_CONF_ALL 3 /*No sensors -> we can use SPIRIT1 LED in this case*/ 00069 #endif /*COMPILE_SENSORS*/ 00070 /*---------------------------------------------------------------------------*/ 00071 #define F_CPU 32000000ul 00072 #define RTIMER_ARCH_SECOND 32768 00073 #define PRESCALER ((F_CPU / (RTIMER_ARCH_SECOND*2))) 00074 00075 #define UART1_CONF_TX_WITH_INTERRUPT 0 00076 #define WITH_SERIAL_LINE_INPUT 1 00077 #define TELNETD_CONF_NUMLINES 6 00078 #define NETSTACK_CONF_RADIO spirit_radio_driver 00079 #define NETSTACK_RADIO_MAX_PAYLOAD_LEN 96 /* spirit1-config.h */ 00080 00081 #if WITH_IP64 00082 #include "ip64-conf.h" 00083 #define WITH_SLIP 1 00084 #ifndef UIP_FALLBACK_INTERFACE 00085 #define UIP_FALLBACK_INTERFACE ip64_uip_fallback_interface 00086 #endif 00087 #endif /* WITH_IP64 */ 00088 00089 /*---------------------------------------------------------------------------*/ 00090 /* define ticks/second for slow and fast clocks. Notice that these should be a 00091 power of two, eg 64,128,256,512 etc, for efficiency as POT's can be optimized 00092 well. */ 00093 #define CLOCK_CONF_SECOND 128 00094 #define RELOAD_VALUE ((F_CPU/CLOCK_CONF_SECOND) - 1) 00095 /* One tick: 62.5 ms */ 00096 00097 #define RTIMER_CLOCK_LT(a,b) ((signed short)((a)-(b)) < 0) 00098 /*---------------------------------------------------------------------------*/ 00099 typedef unsigned long clock_time_t; 00100 typedef unsigned long long rtimer_clock_t; 00101 /*---------------------------------------------------------------------------*/ 00102 #define CC_CONF_REGISTER_ARGS 0 00103 #define CC_CONF_FUNCTION_POINTER_ARGS 1 00104 #define CC_CONF_FASTCALL 00105 #define CC_CONF_VA_ARGS 1 00106 #define CC_CONF_INLINE inline 00107 00108 #define CCIF 00109 #define CLIF 00110 /*---------------------------------------------------------------------------*/ 00111 typedef uint8_t u8_t; 00112 typedef uint16_t u16_t; 00113 typedef uint32_t u32_t; 00114 typedef int32_t s32_t; 00115 typedef unsigned short uip_stats_t; 00116 /*---------------------------------------------------------------------------*/ 00117 #define MULTICHAN_CONF_SET_CHANNEL(x) 00118 #define MULTICHAN_CONF_READ_RSSI(x) 0 00119 /*---------------------------------------------------------------------------*/ 00120 #endif//USE_STM32L1XX_NUCLEO 00121 00122 #ifdef USE_STM32F4XX_NUCLEO 00123 #include <inttypes.h> 00124 #include <string.h> 00125 #include "main.h" 00126 /*---------------------------------------------------------------------------*/ 00127 #define PLATFORM_HAS_LEDS 1 00128 #define PLATFORM_HAS_BUTTON 1 00129 #define PLATFORM_HAS_RADIO 1 00130 00131 #define LEDS_GREEN 1 /*Nucleo LED*/ 00132 #define LEDS_RED 2 /*SPIRIT1 LED*/ 00133 00134 #ifdef COMPILE_SENSORS 00135 #define LEDS_CONF_ALL 1 /*Can't use SPIRIT1 LED in this case*/ 00136 #else 00137 #define LEDS_CONF_ALL 3 /*No sensors -> we can use SPIRIT1 LED in this case*/ 00138 #endif /*COMPILE_SENSORS*/ 00139 /*---------------------------------------------------------------------------*/ 00140 #define F_CPU 84000000ul 00141 #define RTIMER_ARCH_SECOND 96000//32678 00142 //#define PRESCALER uwPrescalerValue 00143 00144 #define UART1_CONF_TX_WITH_INTERRUPT 0 00145 #define WITH_SERIAL_LINE_INPUT 1 00146 #define TELNETD_CONF_NUMLINES 6 00147 #define NETSTACK_CONF_RADIO spirit_radio_driver 00148 #define NETSTACK_RADIO_MAX_PAYLOAD_LEN 96 /* spirit1-config.h */ 00149 00150 #if WITH_IP64 00151 #include "ip64-conf.h" 00152 #define WITH_SLIP 1 00153 #ifndef UIP_FALLBACK_INTERFACE 00154 #define UIP_FALLBACK_INTERFACE ip64_uip_fallback_interface 00155 #endif 00156 #endif /* WITH_IP64 */ 00157 00158 /*---------------------------------------------------------------------------*/ 00159 /* define ticks/second for slow and fast clocks. Notice that these should be a 00160 power of two, eg 64,128,256,512 etc, for efficiency as POT's can be optimized 00161 well. */ 00162 #define CLOCK_CONF_SECOND 512 00163 #define RELOAD_VALUE ((F_CPU/CLOCK_CONF_SECOND) - 1) 00164 00165 /* One tick: 62.5 ms */ 00166 00167 #define RTIMER_CLOCK_LT(a,b) ((signed short)((a)-(b)) < 0) 00168 /*---------------------------------------------------------------------------*/ 00169 typedef unsigned long clock_time_t; 00170 typedef unsigned long long rtimer_clock_t; 00171 /*---------------------------------------------------------------------------*/ 00172 #define CC_CONF_REGISTER_ARGS 0 00173 #define CC_CONF_FUNCTION_POINTER_ARGS 1 00174 #define CC_CONF_FASTCALL 00175 #define CC_CONF_VA_ARGS 1 00176 #define CC_CONF_INLINE inline 00177 00178 #define CCIF 00179 #define CLIF 00180 /*---------------------------------------------------------------------------*/ 00181 typedef uint8_t u8_t; 00182 typedef uint16_t u16_t; 00183 typedef uint32_t u32_t; 00184 typedef int32_t s32_t; 00185 typedef unsigned short uip_stats_t; 00186 /*---------------------------------------------------------------------------*/ 00187 #define MULTICHAN_CONF_SET_CHANNEL(x) 00188 #define MULTICHAN_CONF_READ_RSSI(x) 0 00189 /*---------------------------------------------------------------------------*/ 00190 #endif//USE_STM32F4XX_NUCLEO 00191 00192 #endif /* __PLATFORM_CONF_H__ */ 00193 /*---------------------------------------------------------------------------*/ 00194 /** 00195 * @} 00196 * @} 00197 */
Generated on Tue Jul 12 2022 19:09:04 by 1.7.2