Esempio n. 1
0
int acq_GetDecimation(rp_acq_decimation_t* decimation)
{
    uint32_t decimationVal;
    ECHECK(osc_GetDecimation(&decimationVal));

    if (decimationVal == DEC_1) {
        *decimation = RP_DEC_1;
        return RP_OK;
    }
    else if (decimationVal == DEC_8) {
        *decimation = RP_DEC_8;
        return RP_OK;
    }
    else if (decimationVal == DEC_64) {
        *decimation = RP_DEC_64;
        return RP_OK;
    }
    else if (decimationVal == DEC_1024) {
        *decimation = RP_DEC_1024;
        return RP_OK;
    }
    else if (decimationVal == DEC_8192) {
        *decimation = RP_DEC_8192;
        return RP_OK;
    }
    else if (decimationVal == DEC_65536) {
        *decimation = RP_DEC_65536;
        return RP_OK;
    }
    else {
        return RP_EOOR;
    }
}
Esempio n. 2
0
int acq_GetDecimation(rp_acq_decimation_t* decimation)
{
    uint32_t decimationVal;
    osc_GetDecimation(&decimationVal);

    if      (decimationVal == DEC_1)      *decimation = RP_DEC_1;
    else if (decimationVal == DEC_8)      *decimation = RP_DEC_8;
    else if (decimationVal == DEC_64)     *decimation = RP_DEC_64;
    else if (decimationVal == DEC_1024)   *decimation = RP_DEC_1024;
    else if (decimationVal == DEC_8192)   *decimation = RP_DEC_8192;
    else if (decimationVal == DEC_65536)  *decimation = RP_DEC_65536;
    else {
        return RP_EOOR;
    }

    return RP_OK;
}