232uint32_t
I2C_SW_I_Send(uint8_t u8Address, uint8_t* p8Data, uint32_t u32ByteSize)
284uint32_t
I2C_SW_I_Get(uint8_t u8Address, uint8_t* p8Data, uint32_t u32ByteSize)
#define TIMER_TISR_TIF_Msk
#define TIMER_TCSR_CEN_Msk
#define CLK_CLKSEL1_TMR0_S_XTAL
#define CLK_APBCLK_TMR0_EN_Msk
#define GPIO_PMD_OPEN_DRAIN
void GPIO_SetMode(GPIO_T *gpio, uint32_t u32PinMask, uint32_t u32Mode)
Set GPIO operation mode.
#define outpw(port, value)
Set a 32-bit unsigned value to specified I/O port.
#define P3
Pointer to GPIO port 3 register structure.
#define CLK
Pointer to CLK register structure.
#define TIMER0
Pointer to Timer 0 register structure.
#define NULL
NULL pointer.
uint32_t u32I2C_ByteSizeCount
void I2C_SW_I_Send_Stop(void)
Send I2C STOP signal.
void I2C_SW_I_Get_Byte(void)
Read a byte.
void(* TIMER_CALLBACK)(void)
void I2C_SW_I_Send_Start(void)
Send I2C START signal.
I2C_SW_FLAG_T I2C_SW_STATUS
uint32_t I2C_SW_I_Count(void)
Return byte counter.
uint32_t I2C_SW_I_Open(uint32_t u32BusClock)
Prepare to start software I2C.
uint32_t I2C_SW_I_IsBZ(void)
Check if I2C is busy.
uint32_t I2C_SW_I_Send(uint8_t u8Address, uint8_t *p8Data, uint32_t u32ByteSize)
Send data.
uint32_t I2C_SW_I_Get(uint8_t u8Address, uint8_t *p8Data, uint32_t u32ByteSize)
Read data.
void TMR0_IRQHandler(void)
ISR to handle TIMER0 interrupt event.
void I2C_SW_I_Send_Byte(void)
Send a byte.
This is the header file of i2c_software_gpio_with_timer.c.