mbed library sources
Fork of mbed-src by
Diff: targets/cmsis/TARGET_STM/TARGET_STM32F0/stm32f0xx_hal_comp.h
- Revision:
- 441:d2c15dda23c1
- Parent:
- 392:2b59412bb664
diff -r 8a0b45cd594f -r d2c15dda23c1 targets/cmsis/TARGET_STM/TARGET_STM32F0/stm32f0xx_hal_comp.h --- a/targets/cmsis/TARGET_STM/TARGET_STM32F0/stm32f0xx_hal_comp.h Tue Dec 16 08:15:08 2014 +0000 +++ b/targets/cmsis/TARGET_STM/TARGET_STM32F0/stm32f0xx_hal_comp.h Tue Jan 06 16:15:36 2015 +0000 @@ -2,8 +2,8 @@ ****************************************************************************** * @file stm32f0xx_hal_comp.h * @author MCD Application Team - * @version V1.1.0 - * @date 03-Oct-2014 + * @version V1.2.0 + * @date 11-December-2014 * @brief Header file of COMP HAL module. ****************************************************************************** * @attention @@ -97,18 +97,6 @@ }COMP_InitTypeDef; /** - * @brief HAL State structures definition - */ -typedef enum -{ - HAL_COMP_STATE_RESET = 0x00, /*!< COMP not yet initialized or disabled */ - HAL_COMP_STATE_READY = 0x01, /*!< COMP initialized and ready for use */ - HAL_COMP_STATE_READY_LOCKED = 0x11, /*!< COMP initialized but the configuration is locked */ - HAL_COMP_STATE_BUSY = 0x02, /*!< COMP is running */ - HAL_COMP_STATE_BUSY_LOCKED = 0x12 /*!< COMP is running and the configuration is locked */ -}HAL_COMP_StateTypeDef; - -/** * @brief COMP Handle Structure definition */ typedef struct @@ -116,7 +104,8 @@ COMP_TypeDef *Instance; /*!< Register base address */ COMP_InitTypeDef Init; /*!< COMP required parameters */ HAL_LockTypeDef Lock; /*!< Locking object */ - __IO HAL_COMP_StateTypeDef State; /*!< COMP communication state */ + __IO uint32_t State; /*!< COMP communication state + This parameter can be a value of @ref COMP_State */ }COMP_HandleTypeDef; /** @@ -128,6 +117,18 @@ * @{ */ +/** @defgroup COMP_State COMP State + * @{ + */ +#define HAL_COMP_STATE_RESET ((uint32_t)0x00000000) /*!< COMP not yet initialized or disabled */ +#define HAL_COMP_STATE_READY ((uint32_t)0x00000001) /*!< COMP initialized and ready for use */ +#define HAL_COMP_STATE_READY_LOCKED ((uint32_t)0x00000011) /*!< COMP initialized but the configuration is locked */ +#define HAL_COMP_STATE_BUSY ((uint32_t)0x00000002) /*!< COMP is running */ +#define HAL_COMP_STATE_BUSY_LOCKED ((uint32_t)0x00000012) /*!< COMP is running and the configuration is locked */ +/** + * @} + */ + /** @defgroup COMP_OutputPolarity COMP OutputPolarity * @{ */ @@ -447,7 +448,7 @@ * @{ */ /* Peripheral State and Error functions ***************************************/ -HAL_COMP_StateTypeDef HAL_COMP_GetState(COMP_HandleTypeDef *hcomp); +uint32_t HAL_COMP_GetState(COMP_HandleTypeDef *hcomp); /** * @} */