LTPS C++ API
List of all members
Ci2c_smbus Class Reference

I2C SMBUS I/O class. More...

#include <Ci2c_smbus.h>

Inheritance diagram for Ci2c_smbus:
Ci2c

Public Member Functions

I/O methods

NOTE: it may take too long time to read/write i2c device especially if there are alot of legs/registers so make this functions non-blockable

Return values
>0number of bytes R/W 0 Not opened (?) <0 Errno
int R1b (uint16_t _addr, uint8_t _reg, uint8_t &_b)
 
int W1b (uint16_t _addr, uint8_t _reg, uint8_t _b)
 
int R2b (uint16_t _addr, uint8_t _reg, uint16_t &_b)
 
int W2b (uint16_t _addr, uint8_t _reg, uint16_t _b)
 
int Rbb (uint16_t _addr, uint8_t _reg, uint8_t *_b, uint8_t _blen)
 
int Wbb (uint16_t _addr, uint8_t _reg, uint8_t *_b, uint8_t _blen)
 
int Rqb (uint16_t _addr, uint8_t _reg, uint8_t *_b, uint8_t _blen)
 
int Wqb (uint16_t _addr, uint8_t _reg, uint8_t *_b, uint8_t _blen)
 
- Public Member Functions inherited from Ci2c
int set_slave (uint16_t _addr)
 Set slave device to work with. No need to call it obviously. Call it only for test if device exists. BUT nowtime result is not guaranteed if it can return an error "no such device" due to SMBUS i2c driver realization. More...
 
int set_bus (uint16_t _busn)
 
int set_bus (const char *_buss, i2cmap_t *_map=NULL)
 
int cur_bus (void)
 

Additional Inherited Members

- Static Public Member Functions inherited from Ci2c
static int find_bus (const char *_sock)
 

Detailed Description

I2C SMBUS I/O class.

Author
Dvorkin Dmitry dvork.nosp@m.in@t.nosp@m.ibbo..nosp@m.com
Date
06.07.2016

I2C SMBUS-specific I/O functions

Allow to interact with almost all I2C devices

Examples:
i2c.cpp.

The documentation for this class was generated from the following file: