Subversion Repositories f9daq

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
360 f9daq 1
/**
2
 * $Id: calib.h 881 2013-12-16 05:37:34Z rp_jmenart $
3
 *
4
 * @brief Red Pitaya Oscilloscope Calibration Module.
5
 *
6
 * @Author Jure Menart <juremenart@gmail.com>
7
 *        
8
 * (c) Red Pitaya  http://www.redpitaya.com
9
 *
10
 * This part of code is written in C programming language.
11
 * Please visit http://en.wikipedia.org/wiki/C_(programming_language)
12
 * for more details on the language used herein.
13
 */
14
 
15
#ifndef __CALIB_H
16
#define __CALIB_H
17
 
18
#include <stdint.h>
19
 
20
/** @defgroup calib_h Calibration
21
 * @{
22
 */
23
 
24
/** Calibration parameters, stored in eeprom device
25
 */
26
typedef struct rp_osc_calib_params_s {
27
    uint32_t fe_ch1_fs_g_hi;            /**< High gain front end full scale voltage, channel 1 */
28
    uint32_t fe_ch2_fs_g_hi;            /**< High gain front end full scale voltage, channel 2 */
29
    uint32_t fe_ch1_fs_g_lo;            /**< Low gain front end full scale voltage, channel 1  */
30
    uint32_t fe_ch2_fs_g_lo;            /**< Low gain front end full scale voltage, channel 2  */
31
    int32_t  fe_ch1_dc_offs;            /**< Front end DC offset, channel 1  */
32
    int32_t  fe_ch2_dc_offs;            /**< Front end DC offset, channel 2  */
33
    uint32_t be_ch1_fs;                 /**< Back end full scale voltage, channel 1  */
34
    uint32_t be_ch2_fs;                 /**< Back end full scale voltage, channel 2  */
35
    int32_t  be_ch1_dc_offs;            /**< Back end DC offset, channel 1 */
36
    int32_t  be_ch2_dc_offs;            /**< Back end DC offset, on channel 2 */
37
} rp_calib_params_t;
38
 
39
/** @} */
40
 
41
int rp_read_calib_params(rp_calib_params_t *calib_params);
42
 
43
int rp_default_calib_params(rp_calib_params_t *calib_params);
44
 
45
#endif //__CALIB_H