MG32L003 Standard Peripherals Firmware Library

函数
mg32l003_i2c.c 文件参考

This file provides all the I2C firmware functions. 更多...

`#include "mg32l003_i2c.h"`
`#include "mg32l003_rcc.h"`

## 函数
void | I2C_DeInit (void)
| Deinitializes the I2C peripheral registers to their default reset values. 更多...
void | I2C_Init (I2C_InitTypeDef *I2C_InitStruct)
| Initializes the I2C peripheral according to the specified parameters in the I2C_InitStruct. 更多...
void | I2C_SlaveAddressConfig (uint32_t SlaveAddress)
| Configures the I2C slave address. 更多...
void | I2C_HighSpeedModeCmd (FunctionalState NewState)
| Configures I2C high speed mode. 更多...
void | I2C_SwitchStatus (uint8_t I2C_STA, uint8_t I2C_STO, uint8_t I2C_AA)
| Writes I2C CR register for switching I2C bus status. 更多...
void | I2C_Start (FunctionalState NewState)
| Sets or clears I2C peripheral start status. 更多...
void | I2C_Stop (FunctionalState NewState)
| Sets or clears I2C peripheral stop status. 更多...
void | I2C_ACK (FunctionalState NewState)
| Sets or clears I2C peripheral ACK status. 更多...
void | I2C_Cmd (FunctionalState NewState)
| Enables or disables I2C peripheral. 更多...
void | I2C_AckGeneralCallCmd (FunctionalState NewState)
| Enables or disables the general ack. 更多...
void | I2C_ReceiveByte (uint8_t *pData)
| Reads data from data register. 更多...
void | I2C_WriteByte (uint8_t I2C_DataCmd)
| Write one byte data. 更多...
void | I2C_WriteAddress (uint8_t Address, uint8_t I2C_Direction)
| Write the slave address byte by the direction. 更多...
I2CStatus | I2C_CheckFlag (uint32_t *I2C_Flag)
| Gets the last I2C module status flag. 更多...
ITStatus | I2C_GetITStatus (void)
| Checks whether I2C interrupt has occurred or not. 更多...
void | I2C_ClearITPendingBit (void)
| Clears I2C interrupt pending bit. 更多...

## 详细描述

This file provides all the I2C firmware functions.

作者
  megawin Application Team

版本
  V0.0.5

日期
  13-August-2024