39 ist->i2c_trans.slave_addr = addr;
41 ist->initialized =
false;
43 ist->data_available =
false;
60 switch (
ist->init_status) {
93 ist->initialized =
true;
110#define Int16FromBuf(_buf,_idx) ((int16_t)(_buf[_idx] | (_buf[_idx+1] << 8)))
113 if (!
ist->initialized) {
117 switch (
ist->status) {
133 ist->data_available =
true;
bool i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
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.
@ I2CTransSuccess
transaction successfully finished by I2C driver
@ I2CTransFailed
transaction failed
@ I2CTransDone
transaction set to done by user level
void ist8310_read(struct IST8310 *ist)
void ist8310_event(struct IST8310 *ist)
void ist8310_init(struct IST8310 *ist, struct i2c_periph *i2c_p, uint8_t addr)
Initialize IST8310 struct.
void ist8310_configure(struct IST8310 *ist)
#define Int16FromBuf(_buf, _idx)
Default IST8310 structure.
#define IST8310_REG_CNTL3
#define IST8310_REG_CNTL4
#define IST8310_CNTL1_ODR_SINGLE
#define IST8310_REG_DATA_XL
#define IST8310_CNTL3_SAMPAVG_16
#define IST8310_REG_CNTL1
#define IST8310_CNTL4_SRPD
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.