Commit 60880352 authored by Lucas Russo's avatar Lucas Russo

libclient/bpm_client.*: add RFFE module functions

parent 921a5fe1
......@@ -1135,3 +1135,197 @@ PARAM_FUNC_CLIENT_READ2(gain_d, dir_gain, inv_gain)
return err;
}
/**************** RFFE SMIO Functions ****************/
/* RFFE get/set switching state */
PARAM_FUNC_CLIENT_WRITE(rffe_sw)
{
return param_client_write (self, service, RFFE_OPCODE_SET_GET_SW,
rffe_sw);
}
PARAM_FUNC_CLIENT_READ(rffe_sw)
{
return param_client_read (self, service, RFFE_OPCODE_SET_GET_SW,
rffe_sw);
}
/* RFFE get/set attenuator */
PARAM_FUNC_CLIENT_WRITE_DOUBLE(rffe_att1)
{
return param_client_write_double (self, service, RFFE_OPCODE_SET_GET_ATT1,
rffe_att1);
}
PARAM_FUNC_CLIENT_READ_DOUBLE(rffe_att1)
{
return param_client_read_double (self, service, RFFE_OPCODE_SET_GET_ATT1,
rffe_att1);
}
PARAM_FUNC_CLIENT_WRITE_DOUBLE(rffe_att2)
{
return param_client_write_double (self, service, RFFE_OPCODE_SET_GET_ATT2,
rffe_att2);
}
PARAM_FUNC_CLIENT_READ_DOUBLE(rffe_att2)
{
return param_client_read_double (self, service, RFFE_OPCODE_SET_GET_ATT2,
rffe_att2);
}
/* RFFE get temperatures */
PARAM_FUNC_CLIENT_READ_DOUBLE(rffe_temp1)
{
return param_client_read_double (self, service, RFFE_OPCODE_SET_GET_TEMP1,
rffe_temp1);
}
PARAM_FUNC_CLIENT_READ_DOUBLE(rffe_temp2)
{
return param_client_read_double (self, service, RFFE_OPCODE_SET_GET_TEMP2,
rffe_temp2);
}
PARAM_FUNC_CLIENT_READ_DOUBLE(rffe_temp3)
{
return param_client_read_double (self, service, RFFE_OPCODE_SET_GET_TEMP3,
rffe_temp3);
}
PARAM_FUNC_CLIENT_READ_DOUBLE(rffe_temp4)
{
return param_client_read_double (self, service, RFFE_OPCODE_SET_GET_TEMP4,
rffe_temp4);
}
/* RFFE get/set set points */
PARAM_FUNC_CLIENT_WRITE_DOUBLE(rffe_set_point1)
{
return param_client_write_double (self, service, RFFE_OPCODE_SET_GET_SET_POINT1,
rffe_set_point1);
}
PARAM_FUNC_CLIENT_READ_DOUBLE(rffe_set_point1)
{
return param_client_read_double (self, service, RFFE_OPCODE_SET_GET_SET_POINT1,
rffe_set_point1);
}
PARAM_FUNC_CLIENT_WRITE_DOUBLE(rffe_set_point2)
{
return param_client_write_double (self, service, RFFE_OPCODE_SET_GET_SET_POINT2,
rffe_set_point2);
}
PARAM_FUNC_CLIENT_READ_DOUBLE(rffe_set_point2)
{
return param_client_read_double (self, service, RFFE_OPCODE_SET_GET_SET_POINT2,
rffe_set_point2);
}
/* RFFE get/set temperature control */
PARAM_FUNC_CLIENT_WRITE(rffe_temp_control)
{
return param_client_write (self, service, RFFE_OPCODE_SET_GET_TEMP_CONTROL,
rffe_temp_control);
}
PARAM_FUNC_CLIENT_READ(rffe_temp_control)
{
return param_client_read (self, service, RFFE_OPCODE_SET_GET_TEMP_CONTROL,
rffe_temp_control);
}
/* RFFE outputs */
PARAM_FUNC_CLIENT_WRITE_DOUBLE(rffe_output1)
{
return param_client_write_double (self, service, RFFE_OPCODE_SET_GET_OUTPUT1,
rffe_output1);
}
PARAM_FUNC_CLIENT_READ_DOUBLE(rffe_output1)
{
return param_client_read_double (self, service, RFFE_OPCODE_SET_GET_OUTPUT1,
rffe_output1);
}
PARAM_FUNC_CLIENT_WRITE_DOUBLE(rffe_output2)
{
return param_client_write_double (self, service, RFFE_OPCODE_SET_GET_OUTPUT2,
rffe_output2);
}
PARAM_FUNC_CLIENT_READ_DOUBLE(rffe_output2)
{
return param_client_read_double (self, service, RFFE_OPCODE_SET_GET_OUTPUT2,
rffe_output2);
}
/* RFFE get/set reset */
PARAM_FUNC_CLIENT_WRITE(rffe_reset)
{
return param_client_write (self, service, RFFE_OPCODE_SET_GET_RESET,
rffe_reset);
}
PARAM_FUNC_CLIENT_READ(rffe_reset)
{
return param_client_read (self, service, RFFE_OPCODE_SET_GET_RESET,
rffe_reset);
}
/* RFFE get/set reprogram */
PARAM_FUNC_CLIENT_WRITE(rffe_reprog)
{
return param_client_write (self, service, RFFE_OPCODE_SET_GET_REPROG,
rffe_reprog);
}
PARAM_FUNC_CLIENT_READ(rffe_reprog)
{
return param_client_read (self, service, RFFE_OPCODE_SET_GET_REPROG,
rffe_reprog);
}
/* RFFE set/get data */
bpm_client_err_e bpm_set_rffe_data (bpm_client_t *self, char *service,
smio_rffe_data_block_t *rffe_data_block)
{
uint32_t rw = WRITE_MODE;
return param_client_write_gen (self, service, RFFE_OPCODE_SET_GET_DATA,
rw, rffe_data_block, sizeof (*rffe_data_block));
}
bpm_client_err_e bpm_get_rffe_data (bpm_client_t *self, char *service,
smio_rffe_data_block_t *rffe_data_block)
{
uint32_t rw = READ_MODE;
return param_client_read_gen (self, service, RFFE_OPCODE_SET_GET_DATA,
rw, rffe_data_block, sizeof (*rffe_data_block));
}
/* RFFE get version */
bpm_client_err_e bpm_get_rffe_version (bpm_client_t *self, char *service,
smio_rffe_version_t *rffe_version)
{
uint32_t rw = READ_MODE;
return param_client_read_gen (self, service, RFFE_OPCODE_SET_GET_VERSION,
rw, rffe_version, sizeof (*rffe_version));
}
/* RFFE get/set switching level */
PARAM_FUNC_CLIENT_WRITE(rffe_sw_lvl)
{
return param_client_write (self, service, RFFE_OPCODE_SET_GET_SW_LVL,
rffe_sw_lvl);
}
PARAM_FUNC_CLIENT_READ(rffe_sw_lvl)
{
return param_client_read (self, service, RFFE_OPCODE_SET_GET_SW_LVL,
rffe_sw_lvl);
}
......@@ -398,7 +398,6 @@ bpm_client_err_e bpm_get_monit_amp_ch3 (bpm_client_t *self, char *service,
/********************** SWAP Functions ********************/
/* Switching functions */
/* These set of functions write (set) or read (get) the (de)switching
* scheme. In order to turn the switching on, it is necessary to first
......@@ -482,5 +481,121 @@ bpm_client_err_e bpm_set_gain_d (bpm_client_t *self, char *service,
bpm_client_err_e bpm_get_gain_d (bpm_client_t *self, char *service,
uint32_t *gain_dir, uint32_t *gain_inv);
/********************** RFFE Functions ********************/
/* Switching functions */
/* These set of functions write (set) or read (get) the RFFE switching
* scheme. 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_rffe_sw (bpm_client_t *self, char *service,
uint32_t rffe_sw);
bpm_client_err_e bpm_get_rffe_sw (bpm_client_t *self, char *service,
uint32_t *rffe_sw);
/* Attenuator functions */
/* These set of functions write (set) or read (get) the RFFE attenuator
* values. 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_rffe_att1 (bpm_client_t *self, char *service,
double rffe_att1);
bpm_client_err_e bpm_get_rffe_att1 (bpm_client_t *self, char *service,
double *rffe_att1);
bpm_client_err_e bpm_set_rffe_att2 (bpm_client_t *self, char *service,
double rffe_att2);
bpm_client_err_e bpm_get_rffe_att2 (bpm_client_t *self, char *service,
double *rffe_att2);
/* Temperature functions */
/* These set of functions read (get) the RFFE temperature
* values. 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_get_rffe_temp1 (bpm_client_t *self, char *service,
double *rffe_temp1);
bpm_client_err_e bpm_get_rffe_temp2 (bpm_client_t *self, char *service,
double *rffe_temp2);
bpm_client_err_e bpm_get_rffe_temp3 (bpm_client_t *self, char *service,
double *rffe_temp3);
bpm_client_err_e bpm_get_rffe_temp4 (bpm_client_t *self, char *service,
double *rffe_temp4);
/* Temperature control set point unctions */
/* These set of functions write (set) or read (get) the RFFE set point
* values. 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_rffe_set_point1 (bpm_client_t *self, char *service,
double rffe_set_point1);
bpm_client_err_e bpm_get_rffe_set_point1 (bpm_client_t *self, char *service,
double *rffe_set_point1);
bpm_client_err_e bpm_set_rffe_set_point2 (bpm_client_t *self, char *service,
double rffe_set_point2);
bpm_client_err_e bpm_get_rffe_set_point2 (bpm_client_t *self, char *service,
double *rffe_set_point2);
/* Temperature control enable functions */
/* These set of functions write (set) or read (get) the RFFE temperatue control
* scheme. 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_rffe_temp_control (bpm_client_t *self, char *service,
uint32_t rffe_temp_control);
bpm_client_err_e bpm_get_rffe_temp_control (bpm_client_t *self, char *service,
uint32_t *rffe_temp_control);
/* RFFE output functions */
/* These set of functions write (set) or read (get) the RFFE output
* values. 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_rffe_output1 (bpm_client_t *self, char *service,
double rffe_output1);
bpm_client_err_e bpm_get_rffe_output1 (bpm_client_t *self, char *service,
double *rffe_output1);
bpm_client_err_e bpm_set_rffe_output2 (bpm_client_t *self, char *service,
double rffe_output2);
bpm_client_err_e bpm_get_rffe_output2 (bpm_client_t *self, char *service,
double *rffe_output2);
/* Reset functions */
/* These set of functions write (set) or read (get) the RFFE reset state
* scheme. 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_rffe_reset (bpm_client_t *self, char *service,
uint32_t rffe_reset);
bpm_client_err_e bpm_get_rffe_reset (bpm_client_t *self, char *service,
uint32_t *rffe_reset);
/* Reprogramming functions */
/* These set of functions write (set) or read (get) the RFFE reprogramming
* scheme. 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_rffe_reprog (bpm_client_t *self, char *service,
uint32_t rffe_reprog);
bpm_client_err_e bpm_get_rffe_reprog (bpm_client_t *self, char *service,
uint32_t *rffe_reprog);
/* Data functions */
/* These set of functions write (set) or read (get) the RFFE new firmware data
* for the reprogramming scheme. 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_rffe_data (bpm_client_t *self, char *service,
smio_rffe_data_block_t *rffe_data_block);
bpm_client_err_e bpm_get_rffe_data (bpm_client_t *self, char *service,
smio_rffe_data_block_t *rffe_data_block);
/* Version functions */
/* These set of functions read (get) the RFFE version.
* 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_get_rffe_version (bpm_client_t *self, char *service,
smio_rffe_version_t *rffe_version);
/* Switching level functions */
/* These set of functions write (set) read (get) the RFFE switching level.
* 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_rffe_sw_lvl (bpm_client_t *self, char *service,
uint32_t rffe_sw_lvl);
bpm_client_err_e bpm_get_rffe_sw_lvl (bpm_client_t *self, char *service,
uint32_t *rffe_sw_lvl);
#endif
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