Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 

149 rindas
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. * <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. /* Exported functions --------------------------------------------------------*/
  60. /** @addtogroup FMPI2CEx_Exported_Functions FMPI2C Extended Exported Functions
  61. * @{
  62. */
  63. /** @addtogroup FMPI2CEx_Exported_Functions_Group1 Extended features functions
  64. * @brief Extended features functions
  65. * @{
  66. */
  67. /* Peripheral Control functions ************************************************/
  68. HAL_StatusTypeDef HAL_FMPI2CEx_ConfigAnalogFilter(FMPI2C_HandleTypeDef *hfmpi2c, uint32_t AnalogFilter);
  69. HAL_StatusTypeDef HAL_FMPI2CEx_ConfigDigitalFilter(FMPI2C_HandleTypeDef *hfmpi2c, uint32_t DigitalFilter);
  70. void HAL_FMPI2CEx_EnableFastModePlus(uint32_t ConfigFastModePlus);
  71. void HAL_FMPI2CEx_DisableFastModePlus(uint32_t ConfigFastModePlus);
  72. /* Private constants ---------------------------------------------------------*/
  73. /** @defgroup FMPI2CEx_Private_Constants FMPI2C Extended Private Constants
  74. * @{
  75. */
  76. /**
  77. * @}
  78. */
  79. /* Private macros ------------------------------------------------------------*/
  80. /** @defgroup FMPI2CEx_Private_Macro FMPI2C Extended Private Macros
  81. * @{
  82. */
  83. #define IS_FMPI2C_ANALOG_FILTER(FILTER) (((FILTER) == FMPI2C_ANALOGFILTER_ENABLE) || \
  84. ((FILTER) == FMPI2C_ANALOGFILTER_DISABLE))
  85. #define IS_FMPI2C_DIGITAL_FILTER(FILTER) ((FILTER) <= 0x0000000FU)
  86. #define IS_FMPI2C_FASTMODEPLUS(__CONFIG__) ((((__CONFIG__) & (FMPI2C_FASTMODEPLUS_SCL)) == FMPI2C_FASTMODEPLUS_SCL) || \
  87. (((__CONFIG__) & (FMPI2C_FASTMODEPLUS_SDA)) == FMPI2C_FASTMODEPLUS_SDA))
  88. /**
  89. * @}
  90. */
  91. /* Private Functions ---------------------------------------------------------*/
  92. /** @defgroup FMPI2CEx_Private_Functions FMPI2C Extended Private Functions
  93. * @{
  94. */
  95. /* Private functions are defined in stm32f4xx_hal_fmpfmpi2c_ex.c file */
  96. /**
  97. * @}
  98. */
  99. /**
  100. * @}
  101. */
  102. /**
  103. * @}
  104. */
  105. /**
  106. * @}
  107. */
  108. /**
  109. * @}
  110. */
  111. #endif /* FMPI2C_CR1_PE */
  112. #ifdef __cplusplus
  113. }
  114. #endif
  115. #endif /* STM32F4xx_HAL_FMPI2C_EX_H */
  116. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/