ols: use 32bit for handling sample counts
The OLS protocol sends 16bit values to specify the sample count and delay count. However, this 16bit value is the number of 32bit words to be sampled, so the actual sample count is 4 times larger and does not fit into a uint16_t. Extend it to support the full range of 256K (LogicShrimp will need this) and to prepare support for devices with even more memory (Pepino). Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
6745488b1a
commit
6e5a1a0178
|
@ -396,7 +396,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
|
|||
{
|
||||
struct dev_context *devc;
|
||||
struct sr_serial_dev_inst *serial;
|
||||
uint16_t samplecount, readcount, delaycount;
|
||||
uint32_t samplecount, readcount, delaycount;
|
||||
uint8_t ols_changrp_mask, arg[4];
|
||||
int num_ols_changrp;
|
||||
int ret, i;
|
||||
|
|
Loading…
Reference in New Issue