43#if defined(USE_FULL_DDL_DRIVER)
51#define ASSERT_PARAM(_PARAM_) ((void)0U)
72#define IS_DDL_I2C_PERIPHERAL_MODE(__VALUE__) (((__VALUE__) == DDL_I2C_MODE_I2C) || \
73 ((__VALUE__) == DDL_I2C_MODE_SMBUS_HOST) || \
74 ((__VALUE__) == DDL_I2C_MODE_SMBUS_DEVICE) || \
75 ((__VALUE__) == DDL_I2C_MODE_SMBUS_DEVICE_ARP))
77#define IS_DDL_I2C_CLOCK_SPEED(__VALUE__) (((__VALUE__) > 0U) && ((__VALUE__) <= DDL_I2C_MAX_SPEED_FAST))
79#define IS_DDL_I2C_DUTY_CYCLE(__VALUE__) (((__VALUE__) == DDL_I2C_DUTYCYCLE_2) || \
80 ((__VALUE__) == DDL_I2C_DUTYCYCLE_16_9))
82#if defined(I2C_FILTER_ANFDIS)&&defined(I2C_FILTER_DNFCFG)
83#define IS_DDL_I2C_ANALOG_FILTER(__VALUE__) (((__VALUE__) == DDL_I2C_ANALOGFILTER_ENABLE) || \
84 ((__VALUE__) == DDL_I2C_ANALOGFILTER_DISABLE))
86#define IS_DDL_I2C_DIGITAL_FILTER(__VALUE__) ((__VALUE__) <= 0x0000000FU)
89#define IS_DDL_I2C_OWN_ADDRESS1(__VALUE__) ((__VALUE__) <= 0x000003FFU)
91#define IS_DDL_I2C_TYPE_ACKNOWLEDGE(__VALUE__) (((__VALUE__) == DDL_I2C_ACK) || \
92 ((__VALUE__) == DDL_I2C_NACK))
94#define IS_DDL_I2C_OWN_ADDRSIZE(__VALUE__) (((__VALUE__) == DDL_I2C_OWNADDRESS1_7BIT) || \
95 ((__VALUE__) == DDL_I2C_OWNADDRESS1_10BIT))
121 ErrorStatus status = SUCCESS;
155#if defined(I2C_FILTER_ANFDIS)&&defined(I2C_FILTER_DNFCFG)
169#if defined(I2C_FILTER_ANFDIS)&&defined(I2C_FILTER_DNFCFG)
223#if defined(I2C_FILTER_ANFDIS)&&defined(I2C_FILTER_DNFCFG)
G32 assert template file. This file should be copied to the application folder and renamed to g32_ass...
#define ASSERT_PARAM(_PARAM_)
Header file of I2C DDL module.
Header file of RCM DDL module.
#define DDL_I2C_ANALOGFILTER_ENABLE
#define DDL_I2C_DUTYCYCLE_2
#define DDL_I2C_OWNADDRESS1_7BIT
__STATIC_INLINE void DDL_I2C_ConfigSpeed(I2C_TypeDef *I2Cx, uint32_t PeriphClock, uint32_t ClockSpeed, uint32_t DutyCycle)
Configure the SCL speed.
__STATIC_INLINE void DDL_I2C_ConfigFilters(I2C_TypeDef *I2Cx, uint32_t AnalogFilter, uint32_t DigitalFilter)
Configure Noise Filters (Analog and Digital).
__STATIC_INLINE void DDL_I2C_SetOwnAddress1(I2C_TypeDef *I2Cx, uint32_t OwnAddress1, uint32_t OwnAddrSize)
Set the Own Address1.
__STATIC_INLINE void DDL_I2C_SetMode(I2C_TypeDef *I2Cx, uint32_t PeripheralMode)
Configure peripheral mode.
__STATIC_INLINE void DDL_I2C_Enable(I2C_TypeDef *I2Cx)
Enable I2C peripheral (PE = 1).
__STATIC_INLINE void DDL_I2C_Disable(I2C_TypeDef *I2Cx)
Disable I2C peripheral (PE = 0).
__STATIC_INLINE void DDL_I2C_AcknowledgeNextData(I2C_TypeDef *I2Cx, uint32_t TypeAcknowledge)
Prepare the generation of a ACKnowledge or Non ACKnowledge condition after the address receive match ...
uint32_t DDL_I2C_DeInit(I2C_TypeDef *I2Cx)
De-initialize the I2C registers to their default reset values.
void DDL_I2C_StructInit(DDL_I2C_InitTypeDef *I2C_InitStruct)
Set each DDL_I2C_InitTypeDef field to default value.
uint32_t DDL_I2C_Init(I2C_TypeDef *I2Cx, DDL_I2C_InitTypeDef *I2C_InitStruct)
Initialize the I2C registers according to the specified parameters in I2C_InitStruct.
#define IS_DDL_I2C_PERIPHERAL_MODE(__VALUE__)
#define IS_DDL_I2C_DIGITAL_FILTER(__VALUE__)
#define IS_DDL_I2C_OWN_ADDRESS1(__VALUE__)
#define IS_DDL_I2C_TYPE_ACKNOWLEDGE(__VALUE__)
#define IS_DDL_I2C_OWN_ADDRSIZE(__VALUE__)
#define IS_DDL_I2C_CLOCK_SPEED(__VALUE__)
#define IS_DDL_I2C_DUTY_CYCLE(__VALUE__)
#define IS_DDL_I2C_ANALOG_FILTER(__VALUE__)
#define DDL_RCM_APB_RESET_I2C
void DDL_RCM_GetSystemClocksFreq(DDL_RCM_ClocksTypeDef *RCM_Clocks)
Return the frequencies of different on chip clocks; System, AHB, APB buses clocks.
__STATIC_INLINE void DDL_RCM_EnableAPBReset(uint32_t Peripheral)
Enable the APB peripheral reset.
__STATIC_INLINE void DDL_RCM_DisableAPBReset(uint32_t Peripheral)
Disable the APB peripheral reset.
RCM Clocks Frequency Structure.