|
PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
Go to the documentation of this file.
30 #if defined(__cplusplus)
42 int (*close)(
I2C *dev);
43 int (*read)(
I2C *dev,
int address, uint8_t *buffer,
int count,
int stop);
44 int (*readMore)(
I2C *dev, uint8_t *buffer,
int count,
int stop);
45 int (*write)(
I2C *dev,
int address, uint8_t *buffer,
int count,
int stop);
46 int (*writeMore)(
I2C *dev, uint8_t *buffer,
int count,
int stop);
147 return (*dev->ops->close)(dev);
171 return (*dev->ops->write)(dev, address, buffer,
count, stop);
193 return (*dev->ops->writeMore)(dev, buffer,
count, stop);
214 static inline int i2cRead(
I2C *dev,
int address, uint8_t *buffer,
int count,
int stop)
216 return (*dev->ops->read)(dev, address, buffer,
count, stop);
239 return (*dev->ops->readMore)(dev, buffer,
count, stop);
243 int cog_i2cRead(
I2C *dev,
int address, uint8_t *buffer,
int count,
int stop);
244 int cog_i2cReadMore(
I2C *dev, uint8_t *buffer,
int count,
int stop);
245 int cog_i2cWrite(
I2C *dev,
int address, uint8_t *buffer,
int count,
int stop);
246 int cog_i2cWriteMore(
I2C *dev, uint8_t *buffer,
int count,
int stop);
248 #if defined(__cplusplus)
static int i2cClose(I2C *dev)
Close an I2C device.
static int i2cRead(I2C *dev, int address, uint8_t *buffer, int count, int stop)
Read from an I2C device.
static int i2cWrite(I2C *dev, int address, uint8_t *buffer, int count, int stop)
Write to an I2C device.
I2C * i2cBootOpen(void)
Open the boot i2c bus on Propeller pins 28/29.
void * i2cBootBuffer(void)
Get the address of the boot i2c bus COG driver.
static int i2cReadMore(I2C *dev, uint8_t *buffer, int count, int stop)
Read more from an I2C device.
static int i2cWriteMore(I2C *dev, uint8_t *buffer, int count, int stop)
Write more to an I2C device.
I2C * simple_i2cOpen(I2C_SIMPLE *dev, int scl, int sda)
Open an I2C device.
Declarations here are not meant as public API.
I2C * i2cOpen(I2C_COGDRIVER *dev, int scl, int sda, int freq)
Open an I2C device.
void * i2cGetCogBuffer(void)
Return a pointer to the I2C COG driver image.