110 #define Int16FromBuf(_buf,_idx) ((int16_t)(_buf[_idx] | (_buf[_idx+1] << 8)))
#define IST8310_CNTL1_ODR_SINGLE
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
transaction successfully finished by I2C driver
void ist8310_configure(struct IST8310 *ist)
#define IST8310_CNTL3_SAMPAVG_16
void ist8310_init(struct IST8310 *ist, struct i2c_periph *i2c_p, uint8_t addr)
Initialize IST8310 struct.
Default IST8310 structure.
#define IST8310_REG_CNTL1
bool initialized
config done flag
enum IST8310ConfStatus init_status
init status
#define IST8310_CNTL4_SRPD
#define Int16FromBuf(_buf, _idx)
transaction set to done by user level
void ist8310_event(struct IST8310 *ist)
struct i2c_transaction i2c_trans
i2c transaction used for communication with the ist8310
bool i2c_transceive(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len_w, uint16_t len_r)
Submit a write/read transaction.
enum I2CTransactionStatus status
Transaction status.
bool i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
#define IST8310_REG_DATA_XL
uint8_t slave_addr
Slave address.
volatile bool data_available
data ready flag
void ist8310_read(struct IST8310 *ist)
struct i2c_periph * i2c_p
peripheral used for communcation
enum IST8310Status status
main status
#define IST8310_REG_CNTL3
#define IST8310_REG_CNTL4