Lines Matching defs:bytes
116 typedef int (*rts8801_callback) (void *param, unsigned bytes, void *data);
798 * area that is at least maxlen bytes long. The number of bytes
803 * When the call succeeds, the number of bytes returned can be
804 * anywhere in the range from 0 to maxlen bytes.
817 DBG (30, "sane_read: read %ld bytes of %ld\n",
1236 size_t bytes;
1241 bytes = command_bytes_outstanding;
1243 result = sanei_usb_write_bulk (udh, /* 0x02, */ command_buffer, &bytes);
1252 bytes = receive_bytes_outstanding - total_read;
1255 readbuf + total_read, &bytes);
1257 total_read += bytes;
1285 int bytes, void const *data_, int readbytes, void *readdata)
1287 int len = 4 + bytes;
1291 /* We add "bytes" here to account for the possibility that all of the
1292 * data bytes are 0xaa and hence require a following 0x00 byte.
1294 if (command_bytes_outstanding + len + bytes > MAX_COMMANDS_BYTES ||
1309 while (bytes--)
1334 int bytes,
1337 rt_queue_command (command, reg, count, bytes, data, readbytes, readdata);
1342 rt_queue_read_register (int reg, int bytes, void *data)
1344 return rt_queue_command (RTCMD_GETREG, reg, bytes, 0, 0, bytes, data);
1348 rt_read_register_immediate (int reg, int bytes, void *data)
1350 if (rt_queue_read_register (reg, bytes, data) < 0)
1356 rt_queue_set_register (int reg, int bytes, void *data)
1358 return rt_queue_command (RTCMD_SETREG, reg, bytes, bytes, data, 0, 0);
1362 rt_set_register_immediate (int reg, int bytes, void *data)
1364 if (reg < 0xb3 && reg + bytes > 0xb3)
1369 rt_set_register_immediate (0xb4, bytes - bytes_in_first_block - 1,
1375 if (rt_queue_set_register (reg, bytes, data) < 0)
1389 rt_write_sram (int bytes, void *data_)
1393 /* The number of bytes passed in could be much larger than we can transmit
1394 * (0xffc0) bytes. With 0xaa escapes it could be even larger. Accordingly
1396 * bytes would otherwise exceed a limit (I have used 0xf000 as the limit).
1398 while (bytes > 0)
1403 while (now < bytes && bufsize < 0xf000)
1408 for (i = 0; i < 32 && now < bytes; ++i)
1419 bytes -= now;
1426 rt_read_sram (int bytes, void *data_)
1430 while (bytes > 0)
1432 int now = (bytes > 0xf000) ? 0xf000 : bytes;
1433 if (rt_send_command_immediate (RTCMD_READSRAM, 0, bytes, 0, 0, bytes,
1436 bytes -= now;
1531 rt_get_data (int bytes, void *data)
1533 while (bytes)
1535 int bytesnow = bytes;
1543 bytes -= bytesnow;
2169 rt_nvram_write (int block, int location, char const *data, int bytes)
2194 while (bytes--)
2240 rt_nvram_read (int block, int location, unsigned char *data, int bytes)
2266 while (bytes--)
2301 * are at power on time. In particular 13 bytes at 0x10 are
3227 accumfunc (struct dcalibdata *dcd, int bytes, char *data)
3231 while (bytes > 0)
3242 bytes--;
3275 storefunc (struct calibdata *cd, int bytes, char *data)
3279 if (bytes > cd->space)
3280 bytes = cd->space;
3281 memcpy (cd->buffer, data, bytes);
3282 cd->buffer += bytes;
3283 cd->space -= bytes;
3760 writefunc (struct hp3500_write_info *winfo, int bytes, char *data)
3764 if (bytes > winfo->bytesleft)
3772 bytes = winfo->bytesleft;
3773 if (!bytes)
3776 winfo->bytesleft -= bytes;
3777 return write (winfo->scanner->pipe_w, data, bytes) == bytes;