29 if(u32BusClock>500000)
51 for(u32count=0; u32count<8; u32count++)
76int32_t
I2C_SW_Send(uint8_t u8Address, uint8_t* p8Data, uint32_t u32ByteSize)
78 uint32_t u32count = 0;
91 goto I2C_SW_Stop_Send;
93 while(u32count<u32ByteSize)
96 goto I2C_SW_Stop_Send;
119 for(u32count=0; u32count<8; u32count++)
145int32_t
I2C_SW_Get(uint8_t u8Address, uint8_t* p8Data, uint32_t u32ByteSize)
147 uint32_t u32count = 0;
160 goto I2C_SW_Stop_Get;
162 while(u32count<(u32ByteSize-1))
void CLK_SysTickDelay(uint32_t us)
This function execute delay function.
#define GPIO_PMD_OPEN_DRAIN
void GPIO_SetMode(GPIO_T *gpio, uint32_t u32PinMask, uint32_t u32Mode)
Set GPIO operation mode.
#define P1
Pointer to GPIO port 1 register structure.
int32_t I2C_SW_Open(uint32_t u32BusClock)
Prepare to start software I2C.
int32_t I2C_SW_Send(uint8_t u8Address, uint8_t *p8Data, uint32_t u32ByteSize)
Send data.
uint32_t u32_I2C_SW_Delay
int32_t I2C_SW_Get(uint8_t u8Address, uint8_t *p8Data, uint32_t u32ByteSize)
Read data.
uint8_t I2C_SW_Get_byte(uint32_t u32Ack)
Read a byte.
int32_t I2C_SW_Send_byte(uint8_t u8Data)
Send a byte.
This is the header file of i2c_software_gpio.c.