Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of TUKS-COURSE-TIMER by
stm32l4xx_hal_crc_ex.h
00001 /** 00002 ****************************************************************************** 00003 * @file stm32l4xx_hal_crc_ex.h 00004 * @author MCD Application Team 00005 * @version V1.5.1 00006 * @date 31-May-2016 00007 * @brief Header file of CRC HAL extended module. 00008 ****************************************************************************** 00009 * @attention 00010 * 00011 * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> 00012 * 00013 * Redistribution and use in source and binary forms, with or without modification, 00014 * are permitted provided that the following conditions are met: 00015 * 1. Redistributions of source code must retain the above copyright notice, 00016 * this list of conditions and the following disclaimer. 00017 * 2. Redistributions in binary form must reproduce the above copyright notice, 00018 * this list of conditions and the following disclaimer in the documentation 00019 * and/or other materials provided with the distribution. 00020 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00021 * may be used to endorse or promote products derived from this software 00022 * without specific prior written permission. 00023 * 00024 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00025 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00026 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00027 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00028 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00029 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00030 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00031 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00032 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00033 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00034 * 00035 ****************************************************************************** 00036 */ 00037 00038 /* Define to prevent recursive inclusion -------------------------------------*/ 00039 #ifndef __STM32L4xx_HAL_CRC_EX_H 00040 #define __STM32L4xx_HAL_CRC_EX_H 00041 00042 #ifdef __cplusplus 00043 extern "C" { 00044 #endif 00045 00046 /* Includes ------------------------------------------------------------------*/ 00047 #include "stm32l4xx_hal_def.h" 00048 00049 /** @addtogroup STM32L4xx_HAL_Driver 00050 * @{ 00051 */ 00052 00053 /** @addtogroup CRCEx 00054 * @{ 00055 */ 00056 00057 /* Exported types ------------------------------------------------------------*/ 00058 /* Exported constants --------------------------------------------------------*/ 00059 /** @defgroup CRCEx_Exported_Constants CRCEx Exported Constants 00060 * @{ 00061 */ 00062 00063 /** @defgroup CRCEx_Input_Data_Inversion Input Data Inversion Modes 00064 * @{ 00065 */ 00066 #define CRC_INPUTDATA_INVERSION_NONE ((uint32_t)0x00000000) /*!< No input data inversion */ 00067 #define CRC_INPUTDATA_INVERSION_BYTE ((uint32_t)CRC_CR_REV_IN_0) /*!< Byte-wise input data inversion */ 00068 #define CRC_INPUTDATA_INVERSION_HALFWORD ((uint32_t)CRC_CR_REV_IN_1) /*!< HalfWord-wise input data inversion */ 00069 #define CRC_INPUTDATA_INVERSION_WORD ((uint32_t)CRC_CR_REV_IN) /*!< Word-wise input data inversion */ 00070 /** 00071 * @} 00072 */ 00073 00074 /** @defgroup CRCEx_Output_Data_Inversion Output Data Inversion Modes 00075 * @{ 00076 */ 00077 #define CRC_OUTPUTDATA_INVERSION_DISABLE ((uint32_t)0x00000000) /*!< No output data inversion */ 00078 #define CRC_OUTPUTDATA_INVERSION_ENABLE ((uint32_t)CRC_CR_REV_OUT) /*!< Bit-wise output data inversion */ 00079 /** 00080 * @} 00081 */ 00082 00083 /** 00084 * @} 00085 */ 00086 00087 /* Exported macro ------------------------------------------------------------*/ 00088 /** @defgroup CRCEx_Exported_Macros CRCEx Exported Macros 00089 * @{ 00090 */ 00091 00092 /** 00093 * @brief Set CRC output reversal 00094 * @param __HANDLE__: CRC handle 00095 * @retval None 00096 */ 00097 #define __HAL_CRC_OUTPUTREVERSAL_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= CRC_CR_REV_OUT) 00098 00099 /** 00100 * @brief Unset CRC output reversal 00101 * @param __HANDLE__: CRC handle 00102 * @retval None 00103 */ 00104 #define __HAL_CRC_OUTPUTREVERSAL_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(CRC_CR_REV_OUT)) 00105 00106 /** 00107 * @brief Set CRC non-default polynomial 00108 * @param __HANDLE__: CRC handle 00109 * @param __POLYNOMIAL__: 7, 8, 16 or 32-bit polynomial 00110 * @retval None 00111 */ 00112 #define __HAL_CRC_POLYNOMIAL_CONFIG(__HANDLE__, __POLYNOMIAL__) ((__HANDLE__)->Instance->POL = (__POLYNOMIAL__)) 00113 00114 /** 00115 * @} 00116 */ 00117 00118 /* Private macros --------------------------------------------------------*/ 00119 /** @addtogroup CRCEx_Private_Macros CRCEx Private Macros 00120 * @{ 00121 */ 00122 00123 #define IS_CRC_INPUTDATA_INVERSION_MODE(MODE) (((MODE) == CRC_INPUTDATA_INVERSION_NONE) || \ 00124 ((MODE) == CRC_INPUTDATA_INVERSION_BYTE) || \ 00125 ((MODE) == CRC_INPUTDATA_INVERSION_HALFWORD) || \ 00126 ((MODE) == CRC_INPUTDATA_INVERSION_WORD)) 00127 00128 00129 #define IS_CRC_OUTPUTDATA_INVERSION_MODE(MODE) (((MODE) == CRC_OUTPUTDATA_INVERSION_DISABLE) || \ 00130 ((MODE) == CRC_OUTPUTDATA_INVERSION_ENABLE)) 00131 00132 /** 00133 * @} 00134 */ 00135 00136 /* Exported functions --------------------------------------------------------*/ 00137 00138 /** @addtogroup CRCEx_Exported_Functions CRC Extended Exported Functions 00139 * @{ 00140 */ 00141 00142 /** @addtogroup CRCEx_Exported_Functions_Group1 Extended Initialization/de-initialization functions 00143 * @{ 00144 */ 00145 00146 /* Initialization and de-initialization functions ****************************/ 00147 HAL_StatusTypeDef HAL_CRCEx_Polynomial_Set(CRC_HandleTypeDef *hcrc, uint32_t Pol, uint32_t PolyLength); 00148 HAL_StatusTypeDef HAL_CRCEx_Input_Data_Reverse(CRC_HandleTypeDef *hcrc, uint32_t InputReverseMode); 00149 HAL_StatusTypeDef HAL_CRCEx_Output_Data_Reverse(CRC_HandleTypeDef *hcrc, uint32_t OutputReverseMode); 00150 00151 /** 00152 * @} 00153 */ 00154 00155 /** 00156 * @} 00157 */ 00158 00159 /** 00160 * @} 00161 */ 00162 00163 /** 00164 * @} 00165 */ 00166 00167 #ifdef __cplusplus 00168 } 00169 #endif 00170 00171 #endif /* __STM32L4xx_HAL_CRC_EX_H */ 00172 00173 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Tue Jul 12 2022 17:38:49 by
