Kashish Haresh Shah
/
HXCClientShield
HXC Client Shield Repository.
Driver/hw_conf.h@0:bacc6e701fb4, 2021-03-29 (annotated)
- Committer:
- kashish_mbed
- Date:
- Mon Mar 29 15:37:08 2021 +0000
- Revision:
- 0:bacc6e701fb4
Initial Commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kashish_mbed | 0:bacc6e701fb4 | 1 | /* |
kashish_mbed | 0:bacc6e701fb4 | 2 | _ _ _____ _______ |
kashish_mbed | 0:bacc6e701fb4 | 3 | | | | | |_ _| |__ __| |
kashish_mbed | 0:bacc6e701fb4 | 4 | | |__| | __ ___ __ | | ___ | | |
kashish_mbed | 0:bacc6e701fb4 | 5 | | __ |/ _` \ \/ / | | / _ \| | |
kashish_mbed | 0:bacc6e701fb4 | 6 | | | | | (_| |> < _| || (_) | | |
kashish_mbed | 0:bacc6e701fb4 | 7 | |_| |_|\__,_/_/\_\_____\___/|_| |
kashish_mbed | 0:bacc6e701fb4 | 8 | (C)2017 HaxIoT |
kashish_mbed | 0:bacc6e701fb4 | 9 | |
kashish_mbed | 0:bacc6e701fb4 | 10 | Description: contains hardware configuration Macros and Constants |
kashish_mbed | 0:bacc6e701fb4 | 11 | License: Revised BSD License, see LICENSE.TXT file include in the project |
kashish_mbed | 0:bacc6e701fb4 | 12 | */ |
kashish_mbed | 0:bacc6e701fb4 | 13 | /****************************************************************************** |
kashish_mbed | 0:bacc6e701fb4 | 14 | * File : hw_conf.h |
kashish_mbed | 0:bacc6e701fb4 | 15 | * Author : Fahad Mirza (HaxIoT) |
kashish_mbed | 0:bacc6e701fb4 | 16 | * Version : V1.0.0 |
kashish_mbed | 0:bacc6e701fb4 | 17 | * Modified : 13-April-2018 |
kashish_mbed | 0:bacc6e701fb4 | 18 | * Brief : contains hardware configuration Macros and Constants |
kashish_mbed | 0:bacc6e701fb4 | 19 | ****************************************************************************** |
kashish_mbed | 0:bacc6e701fb4 | 20 | * @attention |
kashish_mbed | 0:bacc6e701fb4 | 21 | * |
kashish_mbed | 0:bacc6e701fb4 | 22 | * <h2><center>© Copyright (c) 2017 Haxiot |
kashish_mbed | 0:bacc6e701fb4 | 23 | * All rights reserved.</center></h2> |
kashish_mbed | 0:bacc6e701fb4 | 24 | * |
kashish_mbed | 0:bacc6e701fb4 | 25 | * Redistribution and use in source and binary forms, with or without |
kashish_mbed | 0:bacc6e701fb4 | 26 | * modification, are permitted, provided that the following conditions are met: |
kashish_mbed | 0:bacc6e701fb4 | 27 | * |
kashish_mbed | 0:bacc6e701fb4 | 28 | * 1. Redistribution of source code must retain the above copyright notice, |
kashish_mbed | 0:bacc6e701fb4 | 29 | * this list of conditions and the following disclaimer. |
kashish_mbed | 0:bacc6e701fb4 | 30 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
kashish_mbed | 0:bacc6e701fb4 | 31 | * this list of conditions and the following disclaimer in the documentation |
kashish_mbed | 0:bacc6e701fb4 | 32 | * and/or other materials provided with the distribution. |
kashish_mbed | 0:bacc6e701fb4 | 33 | * 3. Neither the name of STMicroelectronics nor the names of other |
kashish_mbed | 0:bacc6e701fb4 | 34 | * contributors to this software may be used to endorse or promote products |
kashish_mbed | 0:bacc6e701fb4 | 35 | * derived from this software without specific written permission. |
kashish_mbed | 0:bacc6e701fb4 | 36 | * 4. This software, including modifications and/or derivative works of this |
kashish_mbed | 0:bacc6e701fb4 | 37 | * software, must execute solely and exclusively on microcontroller or |
kashish_mbed | 0:bacc6e701fb4 | 38 | * microprocessor devices manufactured by or for STMicroelectronics. |
kashish_mbed | 0:bacc6e701fb4 | 39 | * 5. Redistribution and use of this software other than as permitted under |
kashish_mbed | 0:bacc6e701fb4 | 40 | * this license is void and will automatically terminate your rights under |
kashish_mbed | 0:bacc6e701fb4 | 41 | * this license. |
kashish_mbed | 0:bacc6e701fb4 | 42 | * |
kashish_mbed | 0:bacc6e701fb4 | 43 | * THIS SOFTWARE IS PROVIDED BY HAXIOT AND CONTRIBUTORS "AS IS" |
kashish_mbed | 0:bacc6e701fb4 | 44 | * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT |
kashish_mbed | 0:bacc6e701fb4 | 45 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A |
kashish_mbed | 0:bacc6e701fb4 | 46 | * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY |
kashish_mbed | 0:bacc6e701fb4 | 47 | * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT |
kashish_mbed | 0:bacc6e701fb4 | 48 | * SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
kashish_mbed | 0:bacc6e701fb4 | 49 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
kashish_mbed | 0:bacc6e701fb4 | 50 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, |
kashish_mbed | 0:bacc6e701fb4 | 51 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
kashish_mbed | 0:bacc6e701fb4 | 52 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
kashish_mbed | 0:bacc6e701fb4 | 53 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
kashish_mbed | 0:bacc6e701fb4 | 54 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
kashish_mbed | 0:bacc6e701fb4 | 55 | * |
kashish_mbed | 0:bacc6e701fb4 | 56 | ****************************************************************************** |
kashish_mbed | 0:bacc6e701fb4 | 57 | */ |
kashish_mbed | 0:bacc6e701fb4 | 58 | |
kashish_mbed | 0:bacc6e701fb4 | 59 | /* Define to prevent recursive inclusion -------------------------------------*/ |
kashish_mbed | 0:bacc6e701fb4 | 60 | #ifndef __HW_CONF_H__ |
kashish_mbed | 0:bacc6e701fb4 | 61 | #define __HW_CONF_H__ |
kashish_mbed | 0:bacc6e701fb4 | 62 | |
kashish_mbed | 0:bacc6e701fb4 | 63 | #ifdef __cplusplus |
kashish_mbed | 0:bacc6e701fb4 | 64 | extern "C" { |
kashish_mbed | 0:bacc6e701fb4 | 65 | #endif |
kashish_mbed | 0:bacc6e701fb4 | 66 | |
kashish_mbed | 0:bacc6e701fb4 | 67 | /* RTC HW definition ------------------------------------------------------------ */ |
kashish_mbed | 0:bacc6e701fb4 | 68 | #define RTC_OUTPUT DBG_RTC_OUTPUT |
kashish_mbed | 0:bacc6e701fb4 | 69 | #define RTC_Alarm_IRQn RTC_IRQn |
kashish_mbed | 0:bacc6e701fb4 | 70 | |
kashish_mbed | 0:bacc6e701fb4 | 71 | /* USART HW definition -----------------------------------------------------------*/ |
kashish_mbed | 0:bacc6e701fb4 | 72 | #define HXC_USARTX USART1 |
kashish_mbed | 0:bacc6e701fb4 | 73 | #define HXC_USARTX_CLK_ENABLE() __USART1_CLK_ENABLE() |
kashish_mbed | 0:bacc6e701fb4 | 74 | #define HXC_USARTX_RX_GPIO_CLK_ENABLE() __GPIOA_CLK_ENABLE() |
kashish_mbed | 0:bacc6e701fb4 | 75 | #define HXC_USARTX_TX_GPIO_CLK_ENABLE() __GPIOA_CLK_ENABLE() |
kashish_mbed | 0:bacc6e701fb4 | 76 | |
kashish_mbed | 0:bacc6e701fb4 | 77 | #define HXC_USARTX_FORCE_RESET() __USART1_FORCE_RESET() |
kashish_mbed | 0:bacc6e701fb4 | 78 | #define HXC_USARTX_RELEASE_RESET() __USART1_RELEASE_RESET() |
kashish_mbed | 0:bacc6e701fb4 | 79 | |
kashish_mbed | 0:bacc6e701fb4 | 80 | #define HXC_USARTX_TX_PIN GPIO_PIN_9 |
kashish_mbed | 0:bacc6e701fb4 | 81 | #define HXC_USARTX_TX_GPIO_PORT GPIOA |
kashish_mbed | 0:bacc6e701fb4 | 82 | #define HXC_USARTX_TX_AF GPIO_AF4_USART1 |
kashish_mbed | 0:bacc6e701fb4 | 83 | #define HXC_USARTX_RX_PIN GPIO_PIN_10 |
kashish_mbed | 0:bacc6e701fb4 | 84 | #define HXC_USARTX_RX_GPIO_PORT GPIOA |
kashish_mbed | 0:bacc6e701fb4 | 85 | #define HXC_USARTX_RX_AF GPIO_AF4_USART1 |
kashish_mbed | 0:bacc6e701fb4 | 86 | |
kashish_mbed | 0:bacc6e701fb4 | 87 | // Definition for USARTx's NVIC |
kashish_mbed | 0:bacc6e701fb4 | 88 | #define HXC_USARTX_IRQn USART1_IRQn |
kashish_mbed | 0:bacc6e701fb4 | 89 | #define HXC_USARTX_IRQHandler USART1_IRQHandler |
kashish_mbed | 0:bacc6e701fb4 | 90 | |
kashish_mbed | 0:bacc6e701fb4 | 91 | /* --------------------------- Debug USART HW definition --------------------------*/ |
kashish_mbed | 0:bacc6e701fb4 | 92 | // Definition for UARTx clock resources |
kashish_mbed | 0:bacc6e701fb4 | 93 | #define DBG_UARTX USART2 |
kashish_mbed | 0:bacc6e701fb4 | 94 | #define DBG_UARTX_CLK_ENABLE() __USART2_CLK_ENABLE() |
kashish_mbed | 0:bacc6e701fb4 | 95 | #define DBG_UARTX_RX_GPIO_CLK_ENABLE() __GPIOA_CLK_ENABLE() |
kashish_mbed | 0:bacc6e701fb4 | 96 | #define DBG_UARTX_TX_GPIO_CLK_ENABLE() __GPIOA_CLK_ENABLE() |
kashish_mbed | 0:bacc6e701fb4 | 97 | |
kashish_mbed | 0:bacc6e701fb4 | 98 | #define DBG_UARTX_FORCE_RESET() __USART2_FORCE_RESET() |
kashish_mbed | 0:bacc6e701fb4 | 99 | #define DBG_UARTX_RELEASE_RESET() __USART2_RELEASE_RESET() |
kashish_mbed | 0:bacc6e701fb4 | 100 | |
kashish_mbed | 0:bacc6e701fb4 | 101 | #define DBG_UARTX_TX_PIN GPIO_PIN_2 |
kashish_mbed | 0:bacc6e701fb4 | 102 | #define DBG_UARTX_TX_GPIO_PORT GPIOA |
kashish_mbed | 0:bacc6e701fb4 | 103 | #define DBG_UARTX_TX_AF GPIO_AF4_USART2 |
kashish_mbed | 0:bacc6e701fb4 | 104 | #define DBG_UARTX_RX_PIN GPIO_PIN_3 |
kashish_mbed | 0:bacc6e701fb4 | 105 | #define DBG_UARTX_RX_GPIO_PORT GPIOA |
kashish_mbed | 0:bacc6e701fb4 | 106 | #define DBG_UARTX_RX_AF GPIO_AF4_USART2 |
kashish_mbed | 0:bacc6e701fb4 | 107 | |
kashish_mbed | 0:bacc6e701fb4 | 108 | // Definition for USARTx's NVIC |
kashish_mbed | 0:bacc6e701fb4 | 109 | #define DBG_UARTX_IRQn USART2_IRQn |
kashish_mbed | 0:bacc6e701fb4 | 110 | #define DBG_UARTX_IRQHandler USART2_IRQHandler |
kashish_mbed | 0:bacc6e701fb4 | 111 | |
kashish_mbed | 0:bacc6e701fb4 | 112 | /* --------------------------- Reset pin HW definition --------------------------*/ |
kashish_mbed | 0:bacc6e701fb4 | 113 | #define HXC_RESET_PORT GPIOB |
kashish_mbed | 0:bacc6e701fb4 | 114 | #define HXC_RESET_PIN GPIO_PIN_10 |
kashish_mbed | 0:bacc6e701fb4 | 115 | #define HXC_RESET_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() |
kashish_mbed | 0:bacc6e701fb4 | 116 | |
kashish_mbed | 0:bacc6e701fb4 | 117 | #ifdef __cplusplus |
kashish_mbed | 0:bacc6e701fb4 | 118 | } |
kashish_mbed | 0:bacc6e701fb4 | 119 | #endif |
kashish_mbed | 0:bacc6e701fb4 | 120 | |
kashish_mbed | 0:bacc6e701fb4 | 121 | #endif /* __HW_CONF_H__ */ |
kashish_mbed | 0:bacc6e701fb4 | 122 | |
kashish_mbed | 0:bacc6e701fb4 | 123 | /************************ (C) COPYRIGHT Haxiot *****END OF FILE****/ |
kashish_mbed | 0:bacc6e701fb4 | 124 |