refuse to set sample limit under 4 (protocol can't handle it)
also a bit of whitespace mangling.
This commit is contained in:
parent
b33e7d7058
commit
574ce4988a
|
@ -47,7 +47,8 @@
|
|||
#define NUM_TRIGGER_STAGES 4
|
||||
#define TRIGGER_TYPES "01"
|
||||
#define SERIAL_SPEED B115200
|
||||
#define CLOCK_RATE 100000000
|
||||
#define CLOCK_RATE MHZ(100)
|
||||
#define MIN_NUM_SAMPLES 4
|
||||
|
||||
/* Command opcodes */
|
||||
#define CMD_RESET 0x00
|
||||
|
@ -462,6 +463,8 @@ static int hw_set_configuration(int device_index, int capability, void *value)
|
|||
break;
|
||||
case HWCAP_LIMIT_SAMPLES:
|
||||
tmp_u64 = value;
|
||||
if (*tmp_u64 < MIN_NUM_SAMPLES)
|
||||
return SIGROK_ERR;
|
||||
limit_samples = *tmp_u64;
|
||||
g_message("ols: sample limit %" PRIu64, limit_samples);
|
||||
ret = SIGROK_OK;
|
||||
|
|
Loading…
Reference in New Issue