Mini51 BSP  V3.02.002
The Board Support Package for Mini51 Series
i2c_software_gpio_with_timer.h
Go to the documentation of this file.
1 /**************************************************************************/
12 #ifndef __I2C_SOFTWARE_GPIO_WITH_TIMER_H__
13 #define __I2C_SOFTWARE_GPIO_WITH_TIMER_H__
14 
15 #include "Mini51Series.h"
16 
17 typedef struct
18 {
19  uint32_t COUNT:4;
20  uint32_t NACK:1;
21  uint32_t START:1;
22  uint32_t STOP:1;
23  uint32_t RW:1;
24  uint32_t BUSY:1;
25  uint32_t RESERVE:23;
26 } I2C_SW_FLAG_T;
28 /*---------------------------------------------------------------------------------------------------------*/
29 /* Define functions prototype */
30 /*---------------------------------------------------------------------------------------------------------*/
31 uint32_t I2C_SW_I_Open(uint32_t u32BusClock);
32 uint32_t I2C_SW_I_Send(uint8_t u8Address, uint8_t* p8Data, uint32_t u32ByteSize);
33 uint32_t I2C_SW_I_Get(uint8_t u8Address, uint8_t* p8Data, uint32_t u32ByteSize);
34 uint32_t I2C_SW_I_IsBZ(void);
35 uint32_t I2C_SW_I_Count(void);
36 #endif
37 
uint32_t I2C_SW_I_Count(void)
Return byte counter.
Mini51 series peripheral access layer header file. This file contains all the peripheral register's d...
uint32_t I2C_SW_I_Send(uint8_t u8Address, uint8_t *p8Data, uint32_t u32ByteSize)
Send data.
uint32_t I2C_SW_I_IsBZ(void)
Check if I2C is busy.
uint32_t I2C_SW_I_Get(uint8_t u8Address, uint8_t *p8Data, uint32_t u32ByteSize)
Read data.
uint32_t I2C_SW_I_Open(uint32_t u32BusClock)
Prepare to start software I2C.