Added support for WNC M14A2A Cellular LTE Data Module.
Dependencies: WNC14A2AInterface
Dependents: http-example-wnc http-example-wnc-modified
hw-config.h
00001 /** 00002 ****************************************************************************** 00003 * @file hw-config.h 00004 * @author System LAB 00005 * @version V1.0.0 00006 * @date 17-May-2015 00007 * @brief Header file for Hardware Configuration & Setup 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 #ifndef __HW_CONFIG_H 00039 #define __HW_CONFIG_H 00040 /*---------------------------------------------------------------------------*/ 00041 #include "stm32l-spirit1-config.h" 00042 /*---------------------------------------------------------------------------*/ 00043 #define UART_RxBufferSize 512 00044 /*---------------------------------------------------------------------------*/ 00045 #define I2Cx I2C1 00046 #define I2Cx_CLK_ENABLE() __I2C1_CLK_ENABLE() 00047 #define I2Cx_SDA_GPIO_CLK_ENABLE() __GPIOB_CLK_ENABLE() 00048 #define I2Cx_SCL_GPIO_CLK_ENABLE() __GPIOB_CLK_ENABLE() 00049 /*---------------------------------------------------------------------------*/ 00050 #define I2Cx_FORCE_RESET() __I2C1_FORCE_RESET() 00051 #define I2Cx_RELEASE_RESET() __I2C1_RELEASE_RESET() 00052 /*---------------------------------------------------------------------------*/ 00053 /* Definition for I2Cx Pins */ 00054 #define I2Cx_SCL_PIN GPIO_PIN_8 00055 #define I2Cx_SCL_GPIO_PORT GPIOB 00056 #define I2Cx_SDA_PIN GPIO_PIN_9 00057 #define I2Cx_SDA_GPIO_PORT GPIOB 00058 #define I2Cx_SCL_SDA_AF GPIO_AF4_I2C1 00059 00060 /* Definition for I2Cx's NVIC */ 00061 #define I2Cx_EV_IRQn I2C1_EV_IRQn 00062 #define I2Cx_ER_IRQn I2C1_ER_IRQn 00063 #define I2Cx_EV_IRQHandler I2C1_EV_IRQHandler 00064 #define I2Cx_ER_IRQHandler I2C1_ER_IRQHandler 00065 00066 00067 #define I2Cx I2C1 00068 #define I2Cx_CLK_ENABLE() __I2C1_CLK_ENABLE() 00069 #define I2Cx_SDA_GPIO_CLK_ENABLE() __GPIOB_CLK_ENABLE() 00070 #define I2Cx_SCL_GPIO_CLK_ENABLE() __GPIOB_CLK_ENABLE() 00071 00072 #define I2Cx_FORCE_RESET() __I2C1_FORCE_RESET() 00073 #define I2Cx_RELEASE_RESET() __I2C1_RELEASE_RESET() 00074 00075 /* Definition for I2Cx Pins */ 00076 #define I2Cx_SCL_PIN GPIO_PIN_8 00077 #define I2Cx_SCL_GPIO_PORT GPIOB 00078 #define I2Cx_SDA_PIN GPIO_PIN_9 00079 #define I2Cx_SDA_GPIO_PORT GPIOB 00080 #define I2Cx_SCL_SDA_AF GPIO_AF4_I2C1 00081 00082 /* Definition for I2Cx's NVIC */ 00083 #define I2Cx_EV_IRQn I2C1_EV_IRQn 00084 #define I2Cx_ER_IRQn I2C1_ER_IRQn 00085 #define I2Cx_EV_IRQHandler I2C1_EV_IRQHandler 00086 #define I2Cx_ER_IRQHandler I2C1_ER_IRQHandler 00087 00088 /* User can use this section to tailor USARTx/UARTx instance used and associated 00089 resources */ 00090 /* Definition for USARTx clock resources */ 00091 #define USARTx USART2 00092 #define USARTx_CLK_ENABLE() __USART2_CLK_ENABLE(); 00093 #define DMAx_CLK_ENABLE() __DMA1_CLK_ENABLE() 00094 #define USARTx_RX_GPIO_CLK_ENABLE() __GPIOA_CLK_ENABLE() 00095 #define USARTx_TX_GPIO_CLK_ENABLE() __GPIOA_CLK_ENABLE() 00096 00097 #define USARTx_FORCE_RESET() __USART2_FORCE_RESET() 00098 #define USARTx_RELEASE_RESET() __USART2_RELEASE_RESET() 00099 00100 /* Definition for USARTx Pins */ 00101 #define USARTx_TX_PIN GPIO_PIN_2 00102 #define USARTx_TX_GPIO_PORT GPIOA 00103 00104 #define USARTx_RX_PIN GPIO_PIN_3 00105 #define USARTx_RX_GPIO_PORT GPIOA 00106 00107 /* Definition for USARTx's NVIC */ 00108 #define USARTx_IRQn USART2_IRQn 00109 #define USARTx_IRQHandler USART2_IRQHandler 00110 00111 #define USARTx_TX_AF GPIO_AF7_USART2 00112 #define USARTx_RX_AF GPIO_AF7_USART2 00113 00114 00115 /* Enable sensor mask */ 00116 #define PRESSURE_SENSOR 0x00000001 00117 #define TEMPERATURE_SENSOR 0x00000002 00118 #define HUMIDITY_SENSOR 0x00000004 00119 #define UV_SENSOR 0x00000008 00120 #define ACCELEROMETER_SENSOR 0x00000010 00121 #define GYROSCOPE_SENSOR 0x00000020 00122 #define MAGNETIC_SENSOR 0x00000040 00123 /*---------------------------------------------------------------------------*/ 00124 #endif /*__HW_CONFIG_H*/ 00125 /*---------------------------------------------------------------------------*/
Generated on Tue Jul 12 2022 17:40:25 by 1.7.2