mbed(SerialHalfDuplex入り)

Fork of mbed by mbed official

Committer:
yusuke_kyo
Date:
Wed Apr 08 08:04:18 2015 +0000
Revision:
98:01a414ca7d6d
Parent:
92:4fc01daae5a5
remove SerialHalfDuplex.h

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 89:552587b429a1 1 /**
bogdanm 89:552587b429a1 2 ******************************************************************************
bogdanm 89:552587b429a1 3 * @file stm32f4xx_hal.h
bogdanm 89:552587b429a1 4 * @author MCD Application Team
bogdanm 92:4fc01daae5a5 5 * @version V1.1.0
bogdanm 92:4fc01daae5a5 6 * @date 19-June-2014
bogdanm 89:552587b429a1 7 * @brief This file contains all the functions prototypes for the HAL
bogdanm 89:552587b429a1 8 * module driver.
bogdanm 89:552587b429a1 9 ******************************************************************************
bogdanm 89:552587b429a1 10 * @attention
bogdanm 89:552587b429a1 11 *
bogdanm 89:552587b429a1 12 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
bogdanm 89:552587b429a1 13 *
bogdanm 89:552587b429a1 14 * Redistribution and use in source and binary forms, with or without modification,
bogdanm 89:552587b429a1 15 * are permitted provided that the following conditions are met:
bogdanm 89:552587b429a1 16 * 1. Redistributions of source code must retain the above copyright notice,
bogdanm 89:552587b429a1 17 * this list of conditions and the following disclaimer.
bogdanm 89:552587b429a1 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
bogdanm 89:552587b429a1 19 * this list of conditions and the following disclaimer in the documentation
bogdanm 89:552587b429a1 20 * and/or other materials provided with the distribution.
bogdanm 89:552587b429a1 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
bogdanm 89:552587b429a1 22 * may be used to endorse or promote products derived from this software
bogdanm 89:552587b429a1 23 * without specific prior written permission.
bogdanm 89:552587b429a1 24 *
bogdanm 89:552587b429a1 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
bogdanm 89:552587b429a1 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
bogdanm 89:552587b429a1 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
bogdanm 89:552587b429a1 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
bogdanm 89:552587b429a1 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
bogdanm 89:552587b429a1 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
bogdanm 89:552587b429a1 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
bogdanm 89:552587b429a1 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
bogdanm 89:552587b429a1 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
bogdanm 89:552587b429a1 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bogdanm 89:552587b429a1 35 *
bogdanm 89:552587b429a1 36 ******************************************************************************
bogdanm 89:552587b429a1 37 */
bogdanm 89:552587b429a1 38
bogdanm 89:552587b429a1 39 /* Define to prevent recursive inclusion -------------------------------------*/
bogdanm 89:552587b429a1 40 #ifndef __STM32F4xx_HAL_H
bogdanm 89:552587b429a1 41 #define __STM32F4xx_HAL_H
bogdanm 89:552587b429a1 42
bogdanm 89:552587b429a1 43 #ifdef __cplusplus
bogdanm 89:552587b429a1 44 extern "C" {
bogdanm 89:552587b429a1 45 #endif
bogdanm 89:552587b429a1 46
bogdanm 89:552587b429a1 47 /* Includes ------------------------------------------------------------------*/
bogdanm 89:552587b429a1 48 #include "stm32f4xx_hal_conf.h"
bogdanm 89:552587b429a1 49
bogdanm 89:552587b429a1 50 /** @addtogroup STM32F4xx_HAL_Driver
bogdanm 89:552587b429a1 51 * @{
bogdanm 89:552587b429a1 52 */
bogdanm 89:552587b429a1 53
bogdanm 89:552587b429a1 54 /** @addtogroup HAL
bogdanm 89:552587b429a1 55 * @{
bogdanm 89:552587b429a1 56 */
bogdanm 89:552587b429a1 57
bogdanm 89:552587b429a1 58 /* Exported types ------------------------------------------------------------*/
bogdanm 89:552587b429a1 59 /* Exported constants --------------------------------------------------------*/
bogdanm 89:552587b429a1 60 /* Exported macro ------------------------------------------------------------*/
bogdanm 89:552587b429a1 61
bogdanm 89:552587b429a1 62 /** @brief Freeze/Unfreeze Peripherals in Debug mode
bogdanm 89:552587b429a1 63 */
bogdanm 89:552587b429a1 64 #define __HAL_FREEZE_TIM2_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM2_STOP))
bogdanm 89:552587b429a1 65 #define __HAL_FREEZE_TIM3_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM3_STOP))
bogdanm 89:552587b429a1 66 #define __HAL_FREEZE_TIM4_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM4_STOP))
bogdanm 89:552587b429a1 67 #define __HAL_FREEZE_TIM5_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM5_STOP))
bogdanm 89:552587b429a1 68 #define __HAL_FREEZE_TIM6_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM6_STOP))
bogdanm 89:552587b429a1 69 #define __HAL_FREEZE_TIM7_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM7_STOP))
bogdanm 89:552587b429a1 70 #define __HAL_FREEZE_TIM12_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM12_STOP))
bogdanm 89:552587b429a1 71 #define __HAL_FREEZE_TIM13_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM13_STOP))
bogdanm 89:552587b429a1 72 #define __HAL_FREEZE_TIM14_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM14_STOP))
bogdanm 89:552587b429a1 73 #define __HAL_FREEZE_RTC_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_RTC_STOP))
bogdanm 89:552587b429a1 74 #define __HAL_FREEZE_WWDG_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_WWDG_STOP))
bogdanm 89:552587b429a1 75 #define __HAL_FREEZE_IWDG_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_IWDG_STOP))
bogdanm 89:552587b429a1 76 #define __HAL_FREEZE_I2C1_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT))
bogdanm 89:552587b429a1 77 #define __HAL_FREEZE_I2C2_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT))
bogdanm 89:552587b429a1 78 #define __HAL_FREEZE_I2C3_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT))
bogdanm 89:552587b429a1 79 #define __HAL_FREEZE_CAN1_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_CAN1_STOP))
bogdanm 89:552587b429a1 80 #define __HAL_FREEZE_CAN2_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_CAN2_STOP))
bogdanm 89:552587b429a1 81 #define __HAL_FREEZE_TIM1_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM1_STOP))
bogdanm 89:552587b429a1 82 #define __HAL_FREEZE_TIM8_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM8_STOP))
bogdanm 89:552587b429a1 83 #define __HAL_FREEZE_TIM9_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM9_STOP))
bogdanm 89:552587b429a1 84 #define __HAL_FREEZE_TIM10_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM10_STOP))
bogdanm 89:552587b429a1 85 #define __HAL_FREEZE_TIM11_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM11_STOP))
bogdanm 89:552587b429a1 86
bogdanm 89:552587b429a1 87 #define __HAL_UNFREEZE_TIM2_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM2_STOP))
bogdanm 89:552587b429a1 88 #define __HAL_UNFREEZE_TIM3_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM3_STOP))
bogdanm 89:552587b429a1 89 #define __HAL_UNFREEZE_TIM4_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM4_STOP))
bogdanm 89:552587b429a1 90 #define __HAL_UNFREEZE_TIM5_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM5_STOP))
bogdanm 89:552587b429a1 91 #define __HAL_UNFREEZE_TIM6_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM6_STOP))
bogdanm 89:552587b429a1 92 #define __HAL_UNFREEZE_TIM7_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM7_STOP))
bogdanm 89:552587b429a1 93 #define __HAL_UNFREEZE_TIM12_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM12_STOP))
bogdanm 89:552587b429a1 94 #define __HAL_UNFREEZE_TIM13_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM13_STOP))
bogdanm 89:552587b429a1 95 #define __HAL_UNFREEZE_TIM14_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM14_STOP))
bogdanm 89:552587b429a1 96 #define __HAL_UNFREEZE_RTC_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_RTC_STOP))
bogdanm 89:552587b429a1 97 #define __HAL_UNFREEZE_WWDG_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_WWDG_STOP))
bogdanm 89:552587b429a1 98 #define __HAL_UNFREEZE_IWDG_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_IWDG_STOP))
bogdanm 89:552587b429a1 99 #define __HAL_UNFREEZE_I2C1_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT))
bogdanm 89:552587b429a1 100 #define __HAL_UNFREEZE_I2C2_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT))
bogdanm 89:552587b429a1 101 #define __HAL_UNFREEZE_I2C3_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT))
bogdanm 89:552587b429a1 102 #define __HAL_UNFREEZE_CAN1_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_CAN1_STOP))
bogdanm 89:552587b429a1 103 #define __HAL_UNFREEZE_CAN2_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_CAN2_STOP))
bogdanm 89:552587b429a1 104 #define __HAL_UNFREEZE_TIM1_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM1_STOP))
bogdanm 89:552587b429a1 105 #define __HAL_UNFREEZE_TIM8_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM8_STOP))
bogdanm 89:552587b429a1 106 #define __HAL_UNFREEZE_TIM9_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM9_STOP))
bogdanm 89:552587b429a1 107 #define __HAL_UNFREEZE_TIM10_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM10_STOP))
bogdanm 89:552587b429a1 108 #define __HAL_UNFREEZE_TIM11_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM11_STOP))
bogdanm 89:552587b429a1 109
bogdanm 89:552587b429a1 110 /** @brief Main Flash memory mapped at 0x00000000
bogdanm 89:552587b429a1 111 */
bogdanm 89:552587b429a1 112 #define __HAL_REMAPMEMORY_FLASH() (SYSCFG->MEMRMP &= ~(SYSCFG_MEMRMP_MEM_MODE))
bogdanm 89:552587b429a1 113
bogdanm 89:552587b429a1 114 /** @brief System Flash memory mapped at 0x00000000
bogdanm 89:552587b429a1 115 */
bogdanm 89:552587b429a1 116 #define __HAL_REMAPMEMORY_SYSTEMFLASH() do {SYSCFG->MEMRMP &= ~(SYSCFG_MEMRMP_MEM_MODE);\
bogdanm 89:552587b429a1 117 SYSCFG->MEMRMP |= SYSCFG_MEMRMP_MEM_MODE_0;\
bogdanm 89:552587b429a1 118 }while(0);
bogdanm 89:552587b429a1 119
bogdanm 89:552587b429a1 120 /** @brief Embedded SRAM mapped at 0x00000000
bogdanm 89:552587b429a1 121 */
bogdanm 89:552587b429a1 122 #define __HAL_REMAPMEMORY_SRAM() do {SYSCFG->MEMRMP &= ~(SYSCFG_MEMRMP_MEM_MODE);\
bogdanm 89:552587b429a1 123 SYSCFG->MEMRMP |= (SYSCFG_MEMRMP_MEM_MODE_0 | SYSCFG_MEMRMP_MEM_MODE_1);\
bogdanm 89:552587b429a1 124 }while(0);
bogdanm 89:552587b429a1 125
bogdanm 89:552587b429a1 126 #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)
bogdanm 89:552587b429a1 127 /** @brief FSMC Bank1 (NOR/PSRAM 1 and 2) mapped at 0x00000000
bogdanm 89:552587b429a1 128 */
bogdanm 89:552587b429a1 129 #define __HAL_REMAPMEMORY_FSMC() do {SYSCFG->MEMRMP &= ~(SYSCFG_MEMRMP_MEM_MODE);\
bogdanm 89:552587b429a1 130 SYSCFG->MEMRMP |= (SYSCFG_MEMRMP_MEM_MODE_1);\
bogdanm 89:552587b429a1 131 }while(0);
bogdanm 89:552587b429a1 132 #endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
bogdanm 89:552587b429a1 133
bogdanm 89:552587b429a1 134 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx)
bogdanm 89:552587b429a1 135 /** @brief FMC Bank1 (NOR/PSRAM 1 and 2) mapped at 0x00000000
bogdanm 89:552587b429a1 136 */
bogdanm 89:552587b429a1 137 #define __HAL_REMAPMEMORY_FMC() do {SYSCFG->MEMRMP &= ~(SYSCFG_MEMRMP_MEM_MODE);\
bogdanm 89:552587b429a1 138 SYSCFG->MEMRMP |= (SYSCFG_MEMRMP_MEM_MODE_1);\
bogdanm 89:552587b429a1 139 }while(0);
bogdanm 89:552587b429a1 140
bogdanm 89:552587b429a1 141 /** @brief FMC/SDRAM Bank 1 and 2 mapped at 0x00000000
bogdanm 89:552587b429a1 142 */
bogdanm 89:552587b429a1 143 #define __HAL_REMAPMEMORY_FMC_SDRAM() do {SYSCFG->MEMRMP &= ~(SYSCFG_MEMRMP_MEM_MODE);\
bogdanm 89:552587b429a1 144 SYSCFG->MEMRMP |= (SYSCFG_MEMRMP_MEM_MODE_2);\
bogdanm 89:552587b429a1 145 }while(0);
bogdanm 89:552587b429a1 146 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
bogdanm 89:552587b429a1 147
bogdanm 89:552587b429a1 148 /* Exported functions --------------------------------------------------------*/
bogdanm 89:552587b429a1 149
bogdanm 89:552587b429a1 150 /* Initialization and de-initialization functions ******************************/
bogdanm 89:552587b429a1 151 HAL_StatusTypeDef HAL_Init(void);
bogdanm 89:552587b429a1 152 HAL_StatusTypeDef HAL_DeInit(void);
bogdanm 89:552587b429a1 153 void HAL_MspInit(void);
bogdanm 89:552587b429a1 154 void HAL_MspDeInit(void);
bogdanm 89:552587b429a1 155 HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority);
bogdanm 89:552587b429a1 156
bogdanm 89:552587b429a1 157 /* Peripheral Control functions ************************************************/
bogdanm 89:552587b429a1 158 void HAL_IncTick(void);
bogdanm 89:552587b429a1 159 void HAL_Delay(__IO uint32_t Delay);
bogdanm 89:552587b429a1 160 uint32_t HAL_GetTick(void);
bogdanm 89:552587b429a1 161 void HAL_SuspendTick(void);
bogdanm 89:552587b429a1 162 void HAL_ResumeTick(void);
bogdanm 89:552587b429a1 163 uint32_t HAL_GetHalVersion(void);
bogdanm 89:552587b429a1 164 uint32_t HAL_GetREVID(void);
bogdanm 89:552587b429a1 165 uint32_t HAL_GetDEVID(void);
bogdanm 89:552587b429a1 166 void HAL_EnableDBGSleepMode(void);
bogdanm 89:552587b429a1 167 void HAL_DisableDBGSleepMode(void);
bogdanm 89:552587b429a1 168 void HAL_EnableDBGStopMode(void);
bogdanm 89:552587b429a1 169 void HAL_DisableDBGStopMode(void);
bogdanm 89:552587b429a1 170 void HAL_EnableDBGStandbyMode(void);
bogdanm 89:552587b429a1 171 void HAL_DisableDBGStandbyMode(void);
bogdanm 89:552587b429a1 172 void HAL_EnableCompensationCell(void);
bogdanm 89:552587b429a1 173 void HAL_DisableCompensationCell(void);
bogdanm 89:552587b429a1 174 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx)
bogdanm 89:552587b429a1 175 void HAL_EnableMemorySwappingBank(void);
bogdanm 89:552587b429a1 176 void HAL_DisableMemorySwappingBank(void);
bogdanm 89:552587b429a1 177 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
bogdanm 89:552587b429a1 178
bogdanm 89:552587b429a1 179
bogdanm 89:552587b429a1 180 /**
bogdanm 89:552587b429a1 181 * @}
bogdanm 89:552587b429a1 182 */
bogdanm 89:552587b429a1 183
bogdanm 89:552587b429a1 184 /**
bogdanm 89:552587b429a1 185 * @}
bogdanm 89:552587b429a1 186 */
bogdanm 89:552587b429a1 187
bogdanm 89:552587b429a1 188 #ifdef __cplusplus
bogdanm 89:552587b429a1 189 }
bogdanm 89:552587b429a1 190 #endif
bogdanm 89:552587b429a1 191
bogdanm 89:552587b429a1 192 #endif /* __STM32F4xx_HAL_H */
bogdanm 89:552587b429a1 193
bogdanm 89:552587b429a1 194 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/