![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
2019-2020 Multisensor project using the X_NUCLEO_IKS01A3 sensor platform
Dependencies: X_NUCLEO_IKS01A3
main.h@18:17f5509ac69b, 2019-11-26 (annotated)
- Committer:
- martlefebvre94
- Date:
- Tue Nov 26 11:33:10 2019 +0000
- Revision:
- 18:17f5509ac69b
Addition of GPIOs for controlling the LEDs
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
martlefebvre94 | 18:17f5509ac69b | 1 | /** |
martlefebvre94 | 18:17f5509ac69b | 2 | ****************************************************************************** |
martlefebvre94 | 18:17f5509ac69b | 3 | * @file : main.h |
martlefebvre94 | 18:17f5509ac69b | 4 | * @brief : Header for main.c file. |
martlefebvre94 | 18:17f5509ac69b | 5 | * This file contains the common defines of the application. |
martlefebvre94 | 18:17f5509ac69b | 6 | ****************************************************************************** |
martlefebvre94 | 18:17f5509ac69b | 7 | ** This notice applies to any and all portions of this file |
martlefebvre94 | 18:17f5509ac69b | 8 | * that are not between comment pairs USER CODE BEGIN and |
martlefebvre94 | 18:17f5509ac69b | 9 | * USER CODE END. Other portions of this file, whether |
martlefebvre94 | 18:17f5509ac69b | 10 | * inserted by the user or by software development tools |
martlefebvre94 | 18:17f5509ac69b | 11 | * are owned by their respective copyright owners. |
martlefebvre94 | 18:17f5509ac69b | 12 | * |
martlefebvre94 | 18:17f5509ac69b | 13 | * COPYRIGHT(c) 2019 STMicroelectronics |
martlefebvre94 | 18:17f5509ac69b | 14 | * |
martlefebvre94 | 18:17f5509ac69b | 15 | * Redistribution and use in source and binary forms, with or without modification, |
martlefebvre94 | 18:17f5509ac69b | 16 | * are permitted provided that the following conditions are met: |
martlefebvre94 | 18:17f5509ac69b | 17 | * 1. Redistributions of source code must retain the above copyright notice, |
martlefebvre94 | 18:17f5509ac69b | 18 | * this list of conditions and the following disclaimer. |
martlefebvre94 | 18:17f5509ac69b | 19 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
martlefebvre94 | 18:17f5509ac69b | 20 | * this list of conditions and the following disclaimer in the documentation |
martlefebvre94 | 18:17f5509ac69b | 21 | * and/or other materials provided with the distribution. |
martlefebvre94 | 18:17f5509ac69b | 22 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
martlefebvre94 | 18:17f5509ac69b | 23 | * may be used to endorse or promote products derived from this software |
martlefebvre94 | 18:17f5509ac69b | 24 | * without specific prior written permission. |
martlefebvre94 | 18:17f5509ac69b | 25 | * |
martlefebvre94 | 18:17f5509ac69b | 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
martlefebvre94 | 18:17f5509ac69b | 27 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
martlefebvre94 | 18:17f5509ac69b | 28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
martlefebvre94 | 18:17f5509ac69b | 29 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
martlefebvre94 | 18:17f5509ac69b | 30 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
martlefebvre94 | 18:17f5509ac69b | 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
martlefebvre94 | 18:17f5509ac69b | 32 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
martlefebvre94 | 18:17f5509ac69b | 33 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
martlefebvre94 | 18:17f5509ac69b | 34 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
martlefebvre94 | 18:17f5509ac69b | 35 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
martlefebvre94 | 18:17f5509ac69b | 36 | * |
martlefebvre94 | 18:17f5509ac69b | 37 | ****************************************************************************** |
martlefebvre94 | 18:17f5509ac69b | 38 | */ |
martlefebvre94 | 18:17f5509ac69b | 39 | |
martlefebvre94 | 18:17f5509ac69b | 40 | /* Define to prevent recursive inclusion -------------------------------------*/ |
martlefebvre94 | 18:17f5509ac69b | 41 | #ifndef __MAIN_H__ |
martlefebvre94 | 18:17f5509ac69b | 42 | #define __MAIN_H__ |
martlefebvre94 | 18:17f5509ac69b | 43 | |
martlefebvre94 | 18:17f5509ac69b | 44 | /* Includes ------------------------------------------------------------------*/ |
martlefebvre94 | 18:17f5509ac69b | 45 | |
martlefebvre94 | 18:17f5509ac69b | 46 | /* Private define ------------------------------------------------------------*/ |
martlefebvre94 | 18:17f5509ac69b | 47 | |
martlefebvre94 | 18:17f5509ac69b | 48 | #define B1_Pin GPIO_PIN_13 |
martlefebvre94 | 18:17f5509ac69b | 49 | #define B1_GPIO_Port GPIOC |
martlefebvre94 | 18:17f5509ac69b | 50 | #define MCO_Pin GPIO_PIN_0 |
martlefebvre94 | 18:17f5509ac69b | 51 | #define MCO_GPIO_Port GPIOH |
martlefebvre94 | 18:17f5509ac69b | 52 | #define USART_TX_Pin GPIO_PIN_2 |
martlefebvre94 | 18:17f5509ac69b | 53 | #define USART_TX_GPIO_Port GPIOA |
martlefebvre94 | 18:17f5509ac69b | 54 | #define USART_RX_Pin GPIO_PIN_3 |
martlefebvre94 | 18:17f5509ac69b | 55 | #define USART_RX_GPIO_Port GPIOA |
martlefebvre94 | 18:17f5509ac69b | 56 | #define LD2_Pin GPIO_PIN_5 |
martlefebvre94 | 18:17f5509ac69b | 57 | #define LD2_GPIO_Port GPIOA |
martlefebvre94 | 18:17f5509ac69b | 58 | #define TMS_Pin GPIO_PIN_13 |
martlefebvre94 | 18:17f5509ac69b | 59 | #define TMS_GPIO_Port GPIOA |
martlefebvre94 | 18:17f5509ac69b | 60 | #define TCK_Pin GPIO_PIN_14 |
martlefebvre94 | 18:17f5509ac69b | 61 | #define TCK_GPIO_Port GPIOA |
martlefebvre94 | 18:17f5509ac69b | 62 | |
martlefebvre94 | 18:17f5509ac69b | 63 | /* ########################## Assert Selection ############################## */ |
martlefebvre94 | 18:17f5509ac69b | 64 | /** |
martlefebvre94 | 18:17f5509ac69b | 65 | * @brief Uncomment the line below to expanse the "assert_param" macro in the |
martlefebvre94 | 18:17f5509ac69b | 66 | * HAL drivers code |
martlefebvre94 | 18:17f5509ac69b | 67 | */ |
martlefebvre94 | 18:17f5509ac69b | 68 | /* #define USE_FULL_ASSERT 1U */ |
martlefebvre94 | 18:17f5509ac69b | 69 | |
martlefebvre94 | 18:17f5509ac69b | 70 | void _Error_Handler(char *, int); |
martlefebvre94 | 18:17f5509ac69b | 71 | |
martlefebvre94 | 18:17f5509ac69b | 72 | #define Error_Handler() _Error_Handler(__FILE__, __LINE__) |
martlefebvre94 | 18:17f5509ac69b | 73 | |
martlefebvre94 | 18:17f5509ac69b | 74 | #endif /* __MAIN_H__ */ |
martlefebvre94 | 18:17f5509ac69b | 75 | |
martlefebvre94 | 18:17f5509ac69b | 76 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |