aboutsummaryrefslogtreecommitdiff
path: root/stmhal/hal/inc/stm32f4xx_hal_crc.h
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/hal/inc/stm32f4xx_hal_crc.h')
-rw-r--r--stmhal/hal/inc/stm32f4xx_hal_crc.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/stmhal/hal/inc/stm32f4xx_hal_crc.h b/stmhal/hal/inc/stm32f4xx_hal_crc.h
index 2b8dc7512..2483e3556 100644
--- a/stmhal/hal/inc/stm32f4xx_hal_crc.h
+++ b/stmhal/hal/inc/stm32f4xx_hal_crc.h
@@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f4xx_hal_crc.h
* @author MCD Application Team
- * @version V1.0.0
- * @date 18-February-2014
+ * @version V1.1.0
+ * @date 19-June-2014
* @brief Header file of CRC HAL module.
******************************************************************************
* @attention
@@ -85,6 +85,12 @@ typedef struct
/* Exported constants --------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
+/** @brief Reset CRC handle state
+ * @param __HANDLE__: CRC handle
+ * @retval None
+ */
+#define __HAL_CRC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_CRC_STATE_RESET)
+
/**
* @brief Resets CRC Data Register.
* @param __HANDLE__: CRC handle
@@ -92,6 +98,21 @@ typedef struct
*/
#define __HAL_CRC_DR_RESET(__HANDLE__) ((__HANDLE__)->Instance->CR |= CRC_CR_RESET)
+/**
+ * @brief Stores a 8-bit data in the Independent Data(ID) register.
+ * @param __HANDLE__: CRC handle
+ * @param __VALUE: 8-bit value to be stored in the ID register
+ * @retval None
+ */
+#define __HAL_CRC_SET_IDR(__HANDLE__, __VALUE__) (MODIFY_REG((__HANDLE__)->Instance->IDR, CRC_IDR_IDR, (__VALUE__))
+
+/**
+ * @brief Returns the 8-bit data stored in the Independent Data(ID) register.
+ * @param __HANDLE__: CRC handle
+ * @retval 8-bit value of the ID register
+ */
+#define __HAL_CRC_GET_IDR(__HANDLE__) (((__HANDLE__)->Instance->IDR) & CRC_IDR_IDR)
+
/* Exported functions --------------------------------------------------------*/
/* Initialization/de-initialization functions **********************************/