Commit 9bc86782 authored by Lucas Russo's avatar Lucas Russo

libclient/*: add ADC LTC2208 functions

This is part of github issue #83
parent 7143dfec
......@@ -208,6 +208,50 @@ err_send_msg_alloc:
return err;
}
/* ADC LTC2208 RAND */
PARAM_FUNC_CLIENT_WRITE(adc_rand)
{
return param_client_write (self, service, FMC130M_4CH_OPCODE_ADC_RAND, adc_rand);
}
PARAM_FUNC_CLIENT_READ(adc_rand)
{
return param_client_read (self, service, FMC130M_4CH_OPCODE_ADC_RAND, adc_rand);
}
/* ADC LTC2208 DITH */
PARAM_FUNC_CLIENT_WRITE(adc_dith)
{
return param_client_write (self, service, FMC130M_4CH_OPCODE_ADC_DITH, adc_dith);
}
PARAM_FUNC_CLIENT_READ(adc_dith)
{
return param_client_read (self, service, FMC130M_4CH_OPCODE_ADC_DITH, adc_dith);
}
/* ADC LTC2208 SHDN */
PARAM_FUNC_CLIENT_WRITE(adc_shdn)
{
return param_client_write (self, service, FMC130M_4CH_OPCODE_ADC_SHDN, adc_shdn);
}
PARAM_FUNC_CLIENT_READ(adc_shdn)
{
return param_client_read (self, service, FMC130M_4CH_OPCODE_ADC_SHDN, adc_shdn);
}
/* ADC LTC2208 PGA */
PARAM_FUNC_CLIENT_WRITE(adc_pga)
{
return param_client_write (self, service, FMC130M_4CH_OPCODE_ADC_PGA, adc_pga);
}
PARAM_FUNC_CLIENT_READ(adc_pga)
{
return param_client_read (self, service, FMC130M_4CH_OPCODE_ADC_PGA, adc_pga);
}
/* RAW ADC data 0 value */
PARAM_FUNC_CLIENT_WRITE(adc_data0)
{
......
......@@ -89,6 +89,29 @@ bpm_client_err_e bpm_set_fmc_clk_sel (bpm_client_t *self, char *service,
bpm_client_err_e bpm_get_fmc_clk_sel (bpm_client_t *self, char *service,
uint32_t *clk_sel);
/* ADC LTC2208 Control */
/* These set of functions read (get) or write (set) some ADC LTC2208
* functionalities. Check LTC2208 datasheet for details.
* All of the functions returns BPM_CLIENT_SUCCESS if the
* parameter was correctly set or error (see bpm_client_err.h
* for all possible errors)*/
bpm_client_err_e bpm_set_adc_rand (bpm_client_t *self, char *service,
uint32_t adc_rand);
bpm_client_err_e bpm_get_adc_rand (bpm_client_t *self, char *service,
uint32_t *adc_rand);
bpm_client_err_e bpm_set_adc_dith (bpm_client_t *self, char *service,
uint32_t adc_dith);
bpm_client_err_e bpm_get_adc_dith (bpm_client_t *self, char *service,
uint32_t *adc_dith);
bpm_client_err_e bpm_set_adc_shdn (bpm_client_t *self, char *service,
uint32_t adc_shdn);
bpm_client_err_e bpm_get_adc_shdn (bpm_client_t *self, char *service,
uint32_t *adc_shdn);
bpm_client_err_e bpm_set_adc_pga (bpm_client_t *self, char *service,
uint32_t adc_pga);
bpm_client_err_e bpm_get_adc_pga (bpm_client_t *self, char *service,
uint32_t *adc_pga);
/* RAW ADC data functions */
/* These set of functions read (get) the RAW ADC values.
* All of the functions returns BPM_CLIENT_SUCCESS if the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment