選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 

154 行
4.2 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. * <h2><center>&copy; Copyright (c) 2016 STMicroelectronics.
  10. * All rights reserved.</center></h2>
  11. *
  12. * This software component is licensed by ST under BSD 3-Clause license,
  13. * the "License"; You may not use this file except in compliance with the
  14. * License. You may obtain a copy of the License at:
  15. * opensource.org/licenses/BSD-3-Clause
  16. *
  17. ******************************************************************************
  18. */
  19. /* Define to prevent recursive inclusion -------------------------------------*/
  20. #ifndef STM32F4xx_HAL_FMPI2C_EX_H
  21. #define STM32F4xx_HAL_FMPI2C_EX_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. #if defined(FMPI2C_CR1_PE)
  26. /* Includes ------------------------------------------------------------------*/
  27. #include "stm32f4xx_hal_def.h"
  28. /** @addtogroup STM32F4xx_HAL_Driver
  29. * @{
  30. */
  31. /** @addtogroup FMPI2CEx
  32. * @{
  33. */
  34. /* Exported types ------------------------------------------------------------*/
  35. /* Exported constants --------------------------------------------------------*/
  36. /** @defgroup FMPI2CEx_Exported_Constants FMPI2C Extended Exported Constants
  37. * @{
  38. */
  39. /** @defgroup FMPI2CEx_Analog_Filter FMPI2C Extended Analog Filter
  40. * @{
  41. */
  42. #define FMPI2C_ANALOGFILTER_ENABLE 0x00000000U
  43. #define FMPI2C_ANALOGFILTER_DISABLE FMPI2C_CR1_ANFOFF
  44. /**
  45. * @}
  46. */
  47. /** @defgroup FMPI2CEx_FastModePlus FMPI2C Extended Fast Mode Plus
  48. * @{
  49. */
  50. #define FMPI2C_FASTMODEPLUS_SCL SYSCFG_CFGR_FMPI2C1_SCL /*!< Enable Fast Mode Plus on FMPI2C1 SCL pins */
  51. #define FMPI2C_FASTMODEPLUS_SDA SYSCFG_CFGR_FMPI2C1_SDA /*!< Enable Fast Mode Plus on FMPI2C1 SDA pins */
  52. /**
  53. * @}
  54. */
  55. /**
  56. * @}
  57. */
  58. /* Exported macro ------------------------------------------------------------*/
  59. /** @defgroup FMPI2CEx_Exported_Macros FMPI2C Extended Exported Macros
  60. * @{
  61. */
  62. /**
  63. * @}
  64. */
  65. /* Exported functions --------------------------------------------------------*/
  66. /** @addtogroup FMPI2CEx_Exported_Functions FMPI2C Extended Exported Functions
  67. * @{
  68. */
  69. /** @addtogroup FMPI2CEx_Exported_Functions_Group1 Filter Mode Functions
  70. * @{
  71. */
  72. /* Peripheral Control functions ************************************************/
  73. HAL_StatusTypeDef HAL_FMPI2CEx_ConfigAnalogFilter(FMPI2C_HandleTypeDef *hfmpi2c, uint32_t AnalogFilter);
  74. HAL_StatusTypeDef HAL_FMPI2CEx_ConfigDigitalFilter(FMPI2C_HandleTypeDef *hfmpi2c, uint32_t DigitalFilter);
  75. /**
  76. * @}
  77. */
  78. /** @addtogroup FMPI2CEx_Exported_Functions_Group3 Fast Mode Plus Functions
  79. * @{
  80. */
  81. void HAL_FMPI2CEx_EnableFastModePlus(uint32_t ConfigFastModePlus);
  82. void HAL_FMPI2CEx_DisableFastModePlus(uint32_t ConfigFastModePlus);
  83. /**
  84. * @}
  85. */
  86. /**
  87. * @}
  88. */
  89. /* Private constants ---------------------------------------------------------*/
  90. /** @defgroup FMPI2CEx_Private_Constants FMPI2C Extended Private Constants
  91. * @{
  92. */
  93. /**
  94. * @}
  95. */
  96. /* Private macros ------------------------------------------------------------*/
  97. /** @defgroup FMPI2CEx_Private_Macro FMPI2C Extended Private Macros
  98. * @{
  99. */
  100. #define IS_FMPI2C_ANALOG_FILTER(FILTER) (((FILTER) == FMPI2C_ANALOGFILTER_ENABLE) || \
  101. ((FILTER) == FMPI2C_ANALOGFILTER_DISABLE))
  102. #define IS_FMPI2C_DIGITAL_FILTER(FILTER) ((FILTER) <= 0x0000000FU)
  103. #define IS_FMPI2C_FASTMODEPLUS(__CONFIG__) ((((__CONFIG__) & (FMPI2C_FASTMODEPLUS_SCL)) == FMPI2C_FASTMODEPLUS_SCL) || \
  104. (((__CONFIG__) & (FMPI2C_FASTMODEPLUS_SDA)) == FMPI2C_FASTMODEPLUS_SDA))
  105. /**
  106. * @}
  107. */
  108. /* Private Functions ---------------------------------------------------------*/
  109. /** @defgroup FMPI2CEx_Private_Functions FMPI2C Extended Private Functions
  110. * @{
  111. */
  112. /* Private functions are defined in stm32f4xx_hal_fmpi2c_ex.c file */
  113. /**
  114. * @}
  115. */
  116. /**
  117. * @}
  118. */
  119. /**
  120. * @}
  121. */
  122. #endif /* FMPI2C_CR1_PE */
  123. #ifdef __cplusplus
  124. }
  125. #endif
  126. #endif /* STM32F4xx_HAL_FMPI2C_EX_H */
  127. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/