mbed(SerialHalfDuplex入り)

Fork of mbed by mbed official

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

Who changed what in which revision?

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