| 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
I2C_SW_I_Count
uint32_t I2C_SW_I_Count(void)
Return byte counter.
Definition: i2c_software_gpio_with_timer.c:271
I2C_SW_FLAG_T::NACK
uint32_t NACK
Definition: i2c_software_gpio_with_timer.h:20
I2C_SW_FLAG_T::BUSY
uint32_t BUSY
Definition: i2c_software_gpio_with_timer.h:24
Mini51Series.h
Mini51 series peripheral access layer header file. This file contains all the peripheral register's d...
I2C_SW_I_Send
uint32_t I2C_SW_I_Send(uint8_t u8Address, uint8_t *p8Data, uint32_t u32ByteSize)
Send data.
Definition: i2c_software_gpio_with_timer.c:232
I2C_SW_I_IsBZ
uint32_t I2C_SW_I_IsBZ(void)
Check if I2C is busy.
Definition: i2c_software_gpio_with_timer.c:261
I2C_SW_I_Get
uint32_t I2C_SW_I_Get(uint8_t u8Address, uint8_t *p8Data, uint32_t u32ByteSize)
Read data.
Definition: i2c_software_gpio_with_timer.c:284
I2C_SW_FLAG_T::RW
uint32_t RW
Definition: i2c_software_gpio_with_timer.h:23
I2C_SW_I_Open
uint32_t I2C_SW_I_Open(uint32_t u32BusClock)
Prepare to start software I2C.
Definition: i2c_software_gpio_with_timer.c:33
I2C_SW_FLAG_T
Definition: i2c_software_gpio_with_timer.h:17
I2C_SW_FLAG_T::START
uint32_t START
Definition: i2c_software_gpio_with_timer.h:21
I2C_SW_FLAG_T::COUNT
uint32_t COUNT
Definition: i2c_software_gpio_with_timer.h:19
I2C_SW_FLAG_T::RESERVE
uint32_t RESERVE
Definition: i2c_software_gpio_with_timer.h:25
I2C_SW_FLAG_T::STOP
uint32_t STOP
Definition: i2c_software_gpio_with_timer.h:22