* Check if the given samplerate is supported by the LA8 hardware.
*
* @param samplerate The samplerate (in Hz) to check.
+ *
* @return 1 if the samplerate is supported/valid, 0 otherwise.
*/
static int is_valid_samplerate(uint64_t samplerate)
* Max. value for divcount: 0xfe (2550ns sample period, 392.15kHz samplerate).
*
* @param samplerate The samplerate in Hz.
+ *
* @return The divcount value as needed by the hardware, or 0xff upon errors.
*/
static uint8_t samplerate_to_divcount(uint64_t samplerate)
num_probes = g_slist_length(o->device->probes);
- if (sr_device_has_hwcap(o->device, SR_HWCAP_SAMPLERATE)) {
+ if (sr_dev_has_hwcap(o->device, SR_HWCAP_SAMPLERATE)) {
samplerate = *((uint64_t *) o->device->plugin->get_device_info(
o->device->plugin_index, SR_DI_CUR_SAMPLERATE));
/* TODO: Error checks. */