Use 'kHz' (not 'KHz') consistently.
This commit is contained in:
parent
49d0ce50d0
commit
38ba252251
|
@ -194,7 +194,7 @@ static int __analyzer_set_freq(libusb_device_handle *devh, int freq, int scale)
|
||||||
reg0 = 5;
|
reg0 = 5;
|
||||||
reg2 = 64;
|
reg2 = 64;
|
||||||
break;
|
break;
|
||||||
case FREQ_SCALE_KHZ: /* KHz */
|
case FREQ_SCALE_KHZ: /* kHz */
|
||||||
if (freq >= 500 && freq < 1000) {
|
if (freq >= 500 && freq < 1000) {
|
||||||
reg0 = freq * 0.01;
|
reg0 = freq * 0.01;
|
||||||
divisor = 5;
|
divisor = 5;
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
/**
|
/**
|
||||||
* Convert a numeric samplerate value to its "natural" string representation.
|
* Convert a numeric samplerate value to its "natural" string representation.
|
||||||
*
|
*
|
||||||
* E.g. a value of 3000000 would be converted to "3 MHz", 20000 to "20 KHz".
|
* E.g. a value of 3000000 would be converted to "3 MHz", 20000 to "20 kHz".
|
||||||
*
|
*
|
||||||
* @param samplerate The samplerate in Hz.
|
* @param samplerate The samplerate in Hz.
|
||||||
* @return A malloc()ed string representation of the samplerate value,
|
* @return A malloc()ed string representation of the samplerate value,
|
||||||
|
@ -46,7 +46,7 @@ char *sigrok_samplerate_string(uint64_t samplerate)
|
||||||
else if (samplerate >= MHZ(1))
|
else if (samplerate >= MHZ(1))
|
||||||
r = snprintf(o, 30, "%" PRIu64 " MHz", samplerate / 1000000);
|
r = snprintf(o, 30, "%" PRIu64 " MHz", samplerate / 1000000);
|
||||||
else if (samplerate >= KHZ(1))
|
else if (samplerate >= KHZ(1))
|
||||||
r = snprintf(o, 30, "%" PRIu64 " KHz", samplerate / 1000);
|
r = snprintf(o, 30, "%" PRIu64 " kHz", samplerate / 1000);
|
||||||
else
|
else
|
||||||
r = snprintf(o, 30, "%" PRIu64 " Hz", samplerate);
|
r = snprintf(o, 30, "%" PRIu64 " Hz", samplerate);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue