训练营PLSR题目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

151 lines
4.1 KiB

  1. /**
  2. ******************************************************************************
  3. * @file stm32f4xx_hal_fmpi2c_ex.h
  4. * @author MCD Application Team
  5. * @brief Header file of FMPI2C HAL Extended module.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * Copyright (c) 2016 STMicroelectronics.
  10. * All rights reserved.
  11. *
  12. * This software is licensed under terms that can be found in the LICENSE file
  13. * in the root directory of this software component.
  14. * If no LICENSE file comes with this software, it is provided AS-IS.
  15. *
  16. ******************************************************************************
  17. */
  18. /* Define to prevent recursive inclusion -------------------------------------*/
  19. #ifndef STM32F4xx_HAL_FMPI2C_EX_H
  20. #define STM32F4xx_HAL_FMPI2C_EX_H
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. #if defined(FMPI2C_CR1_PE)
  25. /* Includes ------------------------------------------------------------------*/
  26. #include "stm32f4xx_hal_def.h"
  27. /** @addtogroup STM32F4xx_HAL_Driver
  28. * @{
  29. */
  30. /** @addtogroup FMPI2CEx
  31. * @{
  32. */
  33. /* Exported types ------------------------------------------------------------*/
  34. /* Exported constants --------------------------------------------------------*/
  35. /** @defgroup FMPI2CEx_Exported_Constants FMPI2C Extended Exported Constants
  36. * @{
  37. */
  38. /** @defgroup FMPI2CEx_Analog_Filter FMPI2C Extended Analog Filter
  39. * @{
  40. */
  41. #define FMPI2C_ANALOGFILTER_ENABLE 0x00000000U
  42. #define FMPI2C_ANALOGFILTER_DISABLE FMPI2C_CR1_ANFOFF
  43. /**
  44. * @}
  45. */
  46. /** @defgroup FMPI2CEx_FastModePlus FMPI2C Extended Fast Mode Plus
  47. * @{
  48. */
  49. #define FMPI2C_FASTMODEPLUS_SCL SYSCFG_CFGR_FMPI2C1_SCL /*!< Enable Fast Mode Plus on FMPI2C1 SCL pins */
  50. #define FMPI2C_FASTMODEPLUS_SDA SYSCFG_CFGR_FMPI2C1_SDA /*!< Enable Fast Mode Plus on FMPI2C1 SDA pins */
  51. /**
  52. * @}
  53. */
  54. /**
  55. * @}
  56. */
  57. /* Exported macro ------------------------------------------------------------*/
  58. /** @defgroup FMPI2CEx_Exported_Macros FMPI2C Extended Exported Macros
  59. * @{
  60. */
  61. /**
  62. * @}
  63. */
  64. /* Exported functions --------------------------------------------------------*/
  65. /** @addtogroup FMPI2CEx_Exported_Functions FMPI2C Extended Exported Functions
  66. * @{
  67. */
  68. /** @addtogroup FMPI2CEx_Exported_Functions_Group1 Filter Mode Functions
  69. * @{
  70. */
  71. /* Peripheral Control functions ************************************************/
  72. HAL_StatusTypeDef HAL_FMPI2CEx_ConfigAnalogFilter(FMPI2C_HandleTypeDef *hfmpi2c, uint32_t AnalogFilter);
  73. HAL_StatusTypeDef HAL_FMPI2CEx_ConfigDigitalFilter(FMPI2C_HandleTypeDef *hfmpi2c, uint32_t DigitalFilter);
  74. /**
  75. * @}
  76. */
  77. /** @addtogroup FMPI2CEx_Exported_Functions_Group3 Fast Mode Plus Functions
  78. * @{
  79. */
  80. void HAL_FMPI2CEx_EnableFastModePlus(uint32_t ConfigFastModePlus);
  81. void HAL_FMPI2CEx_DisableFastModePlus(uint32_t ConfigFastModePlus);
  82. /**
  83. * @}
  84. */
  85. /**
  86. * @}
  87. */
  88. /* Private constants ---------------------------------------------------------*/
  89. /** @defgroup FMPI2CEx_Private_Constants FMPI2C Extended Private Constants
  90. * @{
  91. */
  92. /**
  93. * @}
  94. */
  95. /* Private macros ------------------------------------------------------------*/
  96. /** @defgroup FMPI2CEx_Private_Macro FMPI2C Extended Private Macros
  97. * @{
  98. */
  99. #define IS_FMPI2C_ANALOG_FILTER(FILTER) (((FILTER) == FMPI2C_ANALOGFILTER_ENABLE) || \
  100. ((FILTER) == FMPI2C_ANALOGFILTER_DISABLE))
  101. #define IS_FMPI2C_DIGITAL_FILTER(FILTER) ((FILTER) <= 0x0000000FU)
  102. #define IS_FMPI2C_FASTMODEPLUS(__CONFIG__) ((((__CONFIG__) & (FMPI2C_FASTMODEPLUS_SCL)) == FMPI2C_FASTMODEPLUS_SCL) || \
  103. (((__CONFIG__) & (FMPI2C_FASTMODEPLUS_SDA)) == FMPI2C_FASTMODEPLUS_SDA))
  104. /**
  105. * @}
  106. */
  107. /* Private Functions ---------------------------------------------------------*/
  108. /** @defgroup FMPI2CEx_Private_Functions FMPI2C Extended Private Functions
  109. * @{
  110. */
  111. /* Private functions are defined in stm32f4xx_hal_fmpi2c_ex.c file */
  112. /**
  113. * @}
  114. */
  115. /**
  116. * @}
  117. */
  118. /**
  119. * @}
  120. */
  121. #endif /* FMPI2C_CR1_PE */
  122. #ifdef __cplusplus
  123. }
  124. #endif
  125. #endif /* STM32F4xx_HAL_FMPI2C_EX_H */