Lines Matching defs:bytes
69 #define _LM9831_MAX_REG 0x7f /**< number of LM983x bytes */
70 #define _MAX_TRANSFER_SIZE 60 /**< max. number of bytes to transfer */
93 SANE_Word bytes, max_len;
104 for( bytes = 0; len > 0; ) {
113 command_buffer[1] += bytes;
116 command_buffer[2] = (max_len >> 8) & 0xff; /* bytes to write MSB */
117 command_buffer[3] = max_len & 0xff; /* bytes to write LSB */
119 memcpy( command_buffer + _CMD_BYTE_CNT, buffer + bytes, max_len );
138 bytes += (size - _CMD_BYTE_CNT);
151 SANE_Word bytes, max_len, read_bytes;
161 for( bytes = 0; len > 0; ) {
169 command_buffer[1] += bytes;
172 command_buffer[2] = (max_len >> 8) & 0xff; /* bytes to read MSB */
173 command_buffer[3] = max_len & 0xff; /* bytes to read LSB */
196 result = sanei_usb_read_bulk( fd, (buffer + bytes + read_bytes), &size );
202 DBG( 15, "sanei_lm983x_read: read %lu bytes\n", (u_long) size );
213 bytes += (max_len);
234 * Write the command bytes for a register read