![]() |
Mini51 BSP
V3.02.002
The Board Support Package for Mini51 Series
|
MINI51 series software I2C driver source file. More...
Go to the source code of this file.
Macros | |
#define | I2C_SW_SDA P34 |
#define | I2C_SW_CLK P35 |
Typedefs | |
typedef void(* | TIMER_CALLBACK) (void) |
Functions | |
uint32_t | I2C_SW_I_Open (uint32_t u32BusClock) |
Prepare to start software I2C. More... | |
void | TMR0_IRQHandler (void) |
ISR to handle TIMER0 interrupt event. More... | |
void | I2C_SW_I_Send_Stop (void) |
Send I2C STOP signal. More... | |
void | I2C_SW_I_Get_Byte (void) |
Read a byte. More... | |
void | I2C_SW_I_Send_Byte (void) |
Send a byte. More... | |
void | I2C_SW_I_Send_Start (void) |
Send I2C START signal. More... | |
uint32_t | I2C_SW_I_Send (uint8_t u8Address, uint8_t *p8Data, uint32_t u32ByteSize) |
Send data. More... | |
uint32_t | I2C_SW_I_IsBZ (void) |
Check if I2C is busy. More... | |
uint32_t | I2C_SW_I_Count (void) |
Return byte counter. More... | |
uint32_t | I2C_SW_I_Get (uint8_t u8Address, uint8_t *p8Data, uint32_t u32ByteSize) |
Read data. More... | |
Variables | |
TIMER_CALLBACK | funPtr |
I2C_SW_FLAG_T | I2C_SW_STATUS |
uint8_t | u8I2C_Buffer |
uint8_t * | p8I2C_Data |
uint32_t | u32I2C_ByteSize |
uint32_t | u32I2C_ByteSizeCount |
MINI51 series software I2C driver source file.
Definition in file i2c_software_gpio_with_timer.c.
#define I2C_SW_CLK P35 |
Definition at line 17 of file i2c_software_gpio_with_timer.c.
#define I2C_SW_SDA P34 |
Definition at line 16 of file i2c_software_gpio_with_timer.c.
typedef void(* TIMER_CALLBACK) (void) |
Definition at line 19 of file i2c_software_gpio_with_timer.c.
uint32_t I2C_SW_I_Count | ( | void | ) |
Return byte counter.
- |
Byte | counter |
Definition at line 271 of file i2c_software_gpio_with_timer.c.
uint32_t I2C_SW_I_Get | ( | uint8_t | u8Address, |
uint8_t * | p8Data, | ||
uint32_t | u32ByteSize | ||
) |
Read data.
u8Address | I2C slave address |
p8Data | data address |
u32ByteSize | data length |
0 | Success |
1 | Fail |
Definition at line 284 of file i2c_software_gpio_with_timer.c.
void I2C_SW_I_Get_Byte | ( | void | ) |
Read a byte.
None |
Definition at line 105 of file i2c_software_gpio_with_timer.c.
uint32_t I2C_SW_I_IsBZ | ( | void | ) |
Check if I2C is busy.
None |
0 | Not Busy |
1 | Busy |
Definition at line 261 of file i2c_software_gpio_with_timer.c.
uint32_t I2C_SW_I_Open | ( | uint32_t | u32BusClock | ) |
Prepare to start software I2C.
u32BusClock | I2C Bus Clock (Hz) |
0 | Success |
Definition at line 33 of file i2c_software_gpio_with_timer.c.
uint32_t I2C_SW_I_Send | ( | uint8_t | u8Address, |
uint8_t * | p8Data, | ||
uint32_t | u32ByteSize | ||
) |
Send data.
u8Address | I2C slave address |
p8Data | data address |
u32ByteSize | data length |
1 | I2C is busy |
0 | Success |
Definition at line 232 of file i2c_software_gpio_with_timer.c.
void I2C_SW_I_Send_Byte | ( | void | ) |
Send a byte.
None |
Definition at line 149 of file i2c_software_gpio_with_timer.c.
void I2C_SW_I_Send_Start | ( | void | ) |
Send I2C START signal.
None |
Definition at line 210 of file i2c_software_gpio_with_timer.c.
void I2C_SW_I_Send_Stop | ( | void | ) |
Send I2C STOP signal.
None |
Definition at line 81 of file i2c_software_gpio_with_timer.c.
void TMR0_IRQHandler | ( | void | ) |
ISR to handle TIMER0 interrupt event.
None |
Definition at line 65 of file i2c_software_gpio_with_timer.c.
TIMER_CALLBACK funPtr |
Definition at line 21 of file i2c_software_gpio_with_timer.c.
I2C_SW_FLAG_T I2C_SW_STATUS |
Definition at line 22 of file i2c_software_gpio_with_timer.c.
uint8_t* p8I2C_Data |
Definition at line 25 of file i2c_software_gpio_with_timer.c.
uint32_t u32I2C_ByteSize |
Definition at line 26 of file i2c_software_gpio_with_timer.c.
uint32_t u32I2C_ByteSizeCount |
Definition at line 26 of file i2c_software_gpio_with_timer.c.
uint8_t u8I2C_Buffer |
Definition at line 24 of file i2c_software_gpio_with_timer.c.