22 lines
410 B
C
22 lines
410 B
C
/*
|
|
* File: SPI.h
|
|
* Author: JF
|
|
*
|
|
* Created on December 2, 2018, 3:36 PM
|
|
*/
|
|
|
|
#ifndef I2C_H
|
|
#define I2C_H
|
|
|
|
#define I2C_BUFSIZE 10
|
|
#define I2C_TRANSACTION_TIMEOUT_COUNT 800000 //around 10ms
|
|
|
|
int I2CInit();
|
|
int I2CWrite(unsigned char* OutBuf, unsigned char length);
|
|
int I2CRead(unsigned char SlaveAddress, unsigned char* InputBuf,unsigned char length);
|
|
|
|
bool I2CWasLastTransactionOK();
|
|
|
|
#endif /* SPI_H */
|
|
|