pi1541/src/rpi-i2c.h
penfold42 1ed6fd45cd Inital support for I2C bus scanning
- needs to be configurable
- needs to NOT trash the i2c bus when finished
2018-07-17 14:58:26 +10:00

12 lines
440 B
C

#ifndef RPI_I2C_H
#define RPI_I2C_H
#include "rpi-base.h"
extern void RPI_I2CInit(int BSCMaster, int fast);
extern void RPI_I2CSetClock(int BSCMaster, int clock_freq);
extern int RPI_I2CRead(int BSCMaster, unsigned char slaveAddress, void* buffer, unsigned count);
extern int RPI_I2CWrite(int BSCMaster, unsigned char slaveAddress, void* buffer, unsigned count);
extern int RPI_I2CScan(int BSCMaster, unsigned char slaveAddress);
#endif