46 dev->i2c_trans.buf[0] = (index & 0xFF00) >> 8;
47 dev->i2c_trans.buf[1] = (index & 0x00FF);
48 memcpy((
uint8_t *)
dev->i2c_trans.buf + 2, pdata, count);
50 dev->i2c_trans.slave_addr, 2 + count);
56 dev->i2c_trans.buf[0] = (index & 0xFF00) >> 8;
57 dev->i2c_trans.buf[1] = (index & 0x00FF);
59 dev->i2c_trans.slave_addr, 2, count);
60 memcpy(pdata, (
uint8_t *)
dev->i2c_trans.buf, count);
81 (data & 0xFF000000) >> 24,
82 (data & 0x00FF0000) >> 16,
83 (data & 0x0000FF00) >> 8,
98 *data = (data_u8[0] << 8) | data_u8[1];
106 *data = (data_u8[0] << 24) |
bool i2c_blocking_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 and wait for it to complete.
#define I2C_BUF_LEN
I2C buffer length.
bool i2c_blocking_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction and wait for it to complete.
static const struct usb_device_descriptor dev
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
signed char int8_t
Typedef defining 8 bit char type.