18 #if defined(USE_FULL_LL_DRIVER)
20 #if defined(FMPI2C_CR1_PE)
24 #ifdef USE_FULL_ASSERT
25 #include "stm32_assert.h"
27 #define assert_param(expr) ((void)0U)
48 #define IS_LL_FMPI2C_PERIPHERAL_MODE(__VALUE__) (((__VALUE__) == LL_FMPI2C_MODE_I2C) || \
49 ((__VALUE__) == LL_FMPI2C_MODE_SMBUS_HOST) || \
50 ((__VALUE__) == LL_FMPI2C_MODE_SMBUS_DEVICE) || \
51 ((__VALUE__) == LL_FMPI2C_MODE_SMBUS_DEVICE_ARP))
53 #define IS_LL_FMPI2C_ANALOG_FILTER(__VALUE__) (((__VALUE__) == LL_FMPI2C_ANALOGFILTER_ENABLE) || \
54 ((__VALUE__) == LL_FMPI2C_ANALOGFILTER_DISABLE))
56 #define IS_LL_FMPI2C_DIGITAL_FILTER(__VALUE__) ((__VALUE__) <= 0x0000000FU)
58 #define IS_LL_FMPI2C_OWN_ADDRESS1(__VALUE__) ((__VALUE__) <= 0x000003FFU)
60 #define IS_LL_FMPI2C_TYPE_ACKNOWLEDGE(__VALUE__) (((__VALUE__) == LL_FMPI2C_ACK) || \
61 ((__VALUE__) == LL_FMPI2C_NACK))
63 #define IS_LL_FMPI2C_OWN_ADDRSIZE(__VALUE__) (((__VALUE__) == LL_FMPI2C_OWNADDRESS1_7BIT) || \
64 ((__VALUE__) == LL_FMPI2C_OWNADDRESS1_10BIT))
89 ErrorStatus status = SUCCESS;
92 assert_param(IS_FMPI2C_ALL_INSTANCE(FMPI2Cx));
94 if (FMPI2Cx == FMPI2C1)
121 assert_param(IS_FMPI2C_ALL_INSTANCE(FMPI2Cx));
124 assert_param(IS_LL_FMPI2C_PERIPHERAL_MODE(FMPI2C_InitStruct->
PeripheralMode));
125 assert_param(IS_LL_FMPI2C_ANALOG_FILTER(FMPI2C_InitStruct->
AnalogFilter));
126 assert_param(IS_LL_FMPI2C_DIGITAL_FILTER(FMPI2C_InitStruct->
DigitalFilter));
127 assert_param(IS_LL_FMPI2C_OWN_ADDRESS1(FMPI2C_InitStruct->
OwnAddress1));
128 assert_param(IS_LL_FMPI2C_TYPE_ACKNOWLEDGE(FMPI2C_InitStruct->
TypeAcknowledge));
129 assert_param(IS_LL_FMPI2C_OWN_ADDRSIZE(FMPI2C_InitStruct->
OwnAddrSize));
190 FMPI2C_InitStruct->
Timing = 0U;
191 FMPI2C_InitStruct->
AnalogFilter = LL_FMPI2C_ANALOGFILTER_ENABLE;
195 FMPI2C_InitStruct->
OwnAddrSize = LL_FMPI2C_OWNADDRESS1_7BIT;
__STATIC_INLINE void LL_APB1_GRP1_ForceReset(uint32_t Periphs)
Force APB1 peripherals reset. @rmtoll APB1RSTR TIM2RST LL_APB1_GRP1_ForceReset APB1RSTR TIM3RST LL_A...
__STATIC_INLINE void LL_APB1_GRP1_ReleaseReset(uint32_t Periphs)
Release APB1 peripherals reset. @rmtoll APB1RSTR TIM2RST LL_APB1_GRP1_ReleaseReset APB1RSTR TIM3RST ...
__STATIC_INLINE void LL_FMPI2C_Disable(FMPI2C_TypeDef *FMPI2Cx)
Disable FMPI2C peripheral (PE = 0).
__STATIC_INLINE void LL_FMPI2C_EnableOwnAddress1(FMPI2C_TypeDef *FMPI2Cx)
Enable acknowledge on Own Address1 match address. @rmtoll OAR1 OA1EN LL_FMPI2C_EnableOwnAddress1.
__STATIC_INLINE void LL_FMPI2C_ConfigFilters(FMPI2C_TypeDef *FMPI2Cx, uint32_t AnalogFilter, uint32_t DigitalFilter)
Configure Noise Filters (Analog and Digital).
__STATIC_INLINE void LL_FMPI2C_DisableOwnAddress1(FMPI2C_TypeDef *FMPI2Cx)
Disable acknowledge on Own Address1 match address. @rmtoll OAR1 OA1EN LL_FMPI2C_DisableOwnAddress1.
__STATIC_INLINE void LL_FMPI2C_SetOwnAddress1(FMPI2C_TypeDef *FMPI2Cx, uint32_t OwnAddress1, uint32_t OwnAddrSize)
Set the Own Address1. @rmtoll OAR1 OA1 LL_FMPI2C_SetOwnAddress1 OAR1 OA1MODE LL_FMPI2C_SetOwnAddress...
__STATIC_INLINE void LL_FMPI2C_Enable(FMPI2C_TypeDef *FMPI2Cx)
Enable FMPI2C peripheral (PE = 1). @rmtoll CR1 PE LL_FMPI2C_Enable.
__STATIC_INLINE void LL_FMPI2C_SetMode(FMPI2C_TypeDef *FMPI2Cx, uint32_t PeripheralMode)
Configure peripheral mode.
__STATIC_INLINE void LL_FMPI2C_SetTiming(FMPI2C_TypeDef *FMPI2Cx, uint32_t Timing)
Configure the SDA setup, hold time and the SCL high, low period.
__STATIC_INLINE void LL_FMPI2C_AcknowledgeNextData(FMPI2C_TypeDef *FMPI2Cx, uint32_t TypeAcknowledge)
Prepare the generation of a ACKnowledge or Non ACKnowledge condition after the address receive match ...
ErrorStatus LL_FMPI2C_DeInit(const FMPI2C_TypeDef *FMPI2Cx)
De-initialize the FMPI2C registers to their default reset values.
void LL_FMPI2C_StructInit(LL_FMPI2C_InitTypeDef *FMPI2C_InitStruct)
Set each LL_FMPI2C_InitTypeDef field to default value.
ErrorStatus LL_FMPI2C_Init(FMPI2C_TypeDef *FMPI2Cx, const LL_FMPI2C_InitTypeDef *FMPI2C_InitStruct)
Initialize the FMPI2C registers according to the specified parameters in FMPI2C_InitStruct.
Header file of BUS LL module.
Header file of FMPI2C LL module.