int acq_GetSamplingRateHz(float* sampling_rate) { float max_rate = 125000000.0f; rp_acq_decimation_t decimation; ECHECK(acq_GetDecimation(&decimation)); switch(decimation){ case RP_DEC_1: *sampling_rate = max_rate / 1; break; case RP_DEC_8: *sampling_rate = max_rate / 8; break; case RP_DEC_64: *sampling_rate = max_rate / 64; break; case RP_DEC_1024: *sampling_rate = max_rate / 1024; break; case RP_DEC_8192: *sampling_rate = max_rate / 8192; break; case RP_DEC_65536: *sampling_rate = max_rate / 65536; break; } return RP_OK; }
int acq_GetDecimationFactor(uint32_t* decimation) { rp_acq_decimation_t decimationVal; ECHECK(acq_GetDecimation(&decimationVal)); switch (decimationVal) { case RP_DEC_1: *decimation = DEC_1; return RP_OK; case RP_DEC_8: *decimation = DEC_8; return RP_OK; case RP_DEC_64: *decimation = DEC_64; return RP_OK; case RP_DEC_1024: *decimation = DEC_1024; return RP_OK; case RP_DEC_8192: *decimation = DEC_8192; return RP_OK; case RP_DEC_65536: *decimation = DEC_65536; return RP_OK; default: return RP_EOOR; } }
int acq_GetSamplingRate(rp_acq_sampling_rate_t* sampling_rate) { rp_acq_decimation_t decimation; ECHECK(acq_GetDecimation(&decimation)); switch (decimation) { case RP_DEC_1: *sampling_rate = RP_SMP_125M; return RP_OK; case RP_DEC_8: *sampling_rate = RP_SMP_15_625M; return RP_OK; case RP_DEC_64: *sampling_rate = RP_SMP_1_953M; return RP_OK; case RP_DEC_1024: *sampling_rate = RP_SMP_122_070K; return RP_OK; case RP_DEC_8192: *sampling_rate = RP_SMP_15_258K; return RP_OK; case RP_DEC_65536: *sampling_rate = RP_SMP_1_907K; return RP_OK; default: return RP_EOOR; } }
int acq_GetDecimationFactor(uint32_t* decimation) { rp_acq_decimation_t decimationVal; acq_GetDecimation(&decimationVal); switch (decimationVal) { case RP_DEC_1: *decimation = DEC_1; break; case RP_DEC_8: *decimation = DEC_8; break; case RP_DEC_64: *decimation = DEC_64; break; case RP_DEC_1024: *decimation = DEC_1024; break; case RP_DEC_8192: *decimation = DEC_8192; break; case RP_DEC_65536: *decimation = DEC_65536; break; default: return RP_EOOR; } return RP_OK; }