Lines Matching refs:bufs
65 …er(mp_obj_base_t *self_in, uint16_t addr, size_t n, mp_machine_i2c_buf_t *bufs, unsigned int flags… in machine_hw_i2c_transfer() argument
73 for (; n--; ++bufs) { in machine_hw_i2c_transfer()
76 ret = aos_hal_i2c_master_recv(dev, addr, bufs->buf, bufs->len, timeout); in machine_hw_i2c_transfer()
77 for(int k=0; k<bufs->len; k++) { in machine_hw_i2c_transfer()
78 LOGD(LOG_TAG, "data = 0x%2x\n", bufs->buf[k]); in machine_hw_i2c_transfer()
81 ret = aos_hal_i2c_slave_recv(dev, bufs->buf, bufs->len, timeout); in machine_hw_i2c_transfer()
84 if (bufs->len != 0) { in machine_hw_i2c_transfer()
85 for(int k=0; k<bufs->len; k++) { in machine_hw_i2c_transfer()
86 LOGD(LOG_TAG, "data = 0x%2x\n", bufs->buf[k]); in machine_hw_i2c_transfer()
89 ret = aos_hal_i2c_master_send(dev, addr, bufs->buf, bufs->len, timeout); in machine_hw_i2c_transfer()
91 ret = aos_hal_i2c_slave_send(dev, bufs->buf, bufs->len, timeout); in machine_hw_i2c_transfer()
101 data_len += bufs->len; in machine_hw_i2c_transfer()