MINI51DE_BSP V3.02.004
The Board Support Package for Mini51DE Series MCU
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
17typedef 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;
28/*---------------------------------------------------------------------------------------------------------*/
29/* Define functions prototype */
30/*---------------------------------------------------------------------------------------------------------*/
31uint32_t I2C_SW_I_Open(uint32_t u32BusClock);
32uint32_t I2C_SW_I_Send(uint8_t u8Address, uint8_t* p8Data, uint32_t u32ByteSize);
33uint32_t I2C_SW_I_Get(uint8_t u8Address, uint8_t* p8Data, uint32_t u32ByteSize);
34uint32_t I2C_SW_I_IsBZ(void);
35uint32_t I2C_SW_I_Count(void);
36#endif
37
Mini51 series peripheral access layer header file. This file contains all the peripheral register's d...
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.