Lines Matching refs:segments
69 intel_serialio_i2c_slave_device_t* slave, i2c_slave_segment_t *segments, int segment_count)
74 if (segments[i].type != I2C_SEGMENT_TYPE_READ &&
75 segments[i].type != I2C_SEGMENT_TYPE_WRITE) {
115 last_type = segments->type;
118 int len = segments->len;
119 uint8_t* buf = segments->buf;
124 if (last_type == segments->type)
131 switch (segments->type) {
151 printf("invalid i2c segment type: %d\n", segments->type);
160 if (segments->type == I2C_SEGMENT_TYPE_READ) {
163 } else if (segments->type == I2C_SEGMENT_TYPE_WRITE) {
222 last_type = segments->type;
223 segments++;
339 // Build a list of segments to transfer.
340 i2c_slave_segment_t* segments =
341 calloc(segment_count, sizeof(*segments));
342 if (!segments) {
346 i2c_slave_segment_t* cur_segment = segments;
376 status = intel_serialio_i2c_slave_transfer(slave, segments, segment_count);
382 free(segments);