aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/I2C.h
blob: f19af777b1250e9d76c71469aa939c385a24ff10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * I2C.h
 *
 *  Created on: Jun 6, 2018
 *      Author: avi
 */

#ifndef DRIVERS_I2C_COMMUNICATION_I2C_H_
#define DRIVERS_I2C_COMMUNICATION_I2C_H_


uint32_t I2C_control(uint32_t I2C_ID, uint32_t Slave_Add, bool RW,uint32_t Byte2Write );
void Init_All_I2C();

//-------------------------------------------------------------------------------------------------------------

//uint32_t I2C_Write(uint32_t I2C_ID, uint32_t Slave_Add, uint32_t No_BytesTWrite, uint32_t *Bytes2Write );
bool I2C_WriteBuff(uint32_t I2C_BASE, unsigned char addr, unsigned char* data, unsigned int len);

bool I2C_ReadBuff(uint32_t I2C_BASE, unsigned char addr, unsigned char* data, unsigned int len);

uint32_t I2C_Write(uint32_t I2C_ID, uint32_t Slave_Add, uint32_t *I2C_Write_buf, uint32_t No_BytesToWrite );
uint32_t I2C_Read(uint32_t I2C_ID, uint32_t Slave_Add, uint32_t *I2C_Read_buf, uint32_t No_BytesToRead );


#endif /* DRIVERS_I2C_COMMUNICATION_I2C_H_ */