mbed(SerialHalfDuplex入り)

Fork of mbed by mbed official

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

Who changed what in which revision?

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