Commit abddb82e authored by Lucas Russo's avatar Lucas Russo

modules/dsp/*: add MONIT update functions

parent c4ec7ee6
...@@ -40,6 +40,8 @@ ...@@ -40,6 +40,8 @@
#define DSP_NAME_SET_GET_MONIT_POS_Q "dsp_set_get_monit_pos_q" #define DSP_NAME_SET_GET_MONIT_POS_Q "dsp_set_get_monit_pos_q"
#define DSP_OPCODE_SET_GET_MONIT_POS_SUM 13 #define DSP_OPCODE_SET_GET_MONIT_POS_SUM 13
#define DSP_NAME_SET_GET_MONIT_POS_SUM "dsp_set_get_monit_pos_sum" #define DSP_NAME_SET_GET_MONIT_POS_SUM "dsp_set_get_monit_pos_sum"
#define DSP_OPCODE_END 14 #define DSP_OPCODE_SET_GET_MONIT_UPDT 14
#define DSP_NAME_SET_GET_MONIT_UPDT "dsp_set_get_monit_updt"
#define DSP_OPCODE_END 15
#endif #endif
...@@ -163,6 +163,18 @@ RW_PARAM_FUNC(dsp, monit_pos_sum) { ...@@ -163,6 +163,18 @@ RW_PARAM_FUNC(dsp, monit_pos_sum) {
NO_CHK_FUNC, NO_FMT_FUNC, SET_FIELD); NO_CHK_FUNC, NO_FMT_FUNC, SET_FIELD);
} }
#define POS_CALC_DSP_MONIT_UPDT_R(val) (val)
#define POS_CALC_DSP_MONIT_UPDT_W(val) (val)
#define POS_CALC_DSP_MONIT_UPDT_MASK ((1ULL<<32)-1)
#define POS_CALC_DSP_MONIT_UPDT_MIN 0
#define POS_CALC_DSP_MONIT_UPDT_MAX 1
RW_PARAM_FUNC(dsp, monit_updt) {
SET_GET_PARAM(dsp, DSP_CTRL_REGS_OFFS, POS_CALC, DSP_MONIT_UPDT, /* No field */,
MULT_BIT_PARAM, POS_CALC_DSP_MONIT_UPDT_MIN,
POS_CALC_DSP_MONIT_UPDT_MAX, NO_CHK_FUNC, NO_FMT_FUNC, SET_FIELD);
}
/* Exported function pointers */ /* Exported function pointers */
const disp_table_func_fp dsp_exp_fp [] = { const disp_table_func_fp dsp_exp_fp [] = {
RW_PARAM_FUNC_NAME(dsp, kx), RW_PARAM_FUNC_NAME(dsp, kx),
...@@ -179,6 +191,7 @@ const disp_table_func_fp dsp_exp_fp [] = { ...@@ -179,6 +191,7 @@ const disp_table_func_fp dsp_exp_fp [] = {
RW_PARAM_FUNC_NAME(dsp, monit_pos_y), RW_PARAM_FUNC_NAME(dsp, monit_pos_y),
RW_PARAM_FUNC_NAME(dsp, monit_pos_q), RW_PARAM_FUNC_NAME(dsp, monit_pos_q),
RW_PARAM_FUNC_NAME(dsp, monit_pos_sum), RW_PARAM_FUNC_NAME(dsp, monit_pos_sum),
RW_PARAM_FUNC_NAME(dsp, monit_updt),
NULL NULL
}; };
......
...@@ -178,6 +178,18 @@ disp_op_t dsp_set_get_monit_pos_sum_exp = { ...@@ -178,6 +178,18 @@ disp_op_t dsp_set_get_monit_pos_sum_exp = {
} }
}; };
disp_op_t dsp_set_get_monit_updt_exp = {
.name = DSP_NAME_SET_GET_MONIT_UPDT,
.opcode = DSP_OPCODE_SET_GET_MONIT_UPDT,
.retval = DISP_ARG_ENCODE(DISP_ATYPE_UINT32, uint32_t),
.retval_owner = DISP_OWNER_OTHER,
.args = {
DISP_ARG_ENCODE(DISP_ATYPE_UINT32, uint32_t),
DISP_ARG_ENCODE(DISP_ATYPE_UINT32, uint32_t),
DISP_ARG_END
}
};
/* Exported function description */ /* Exported function description */
const disp_op_t *dsp_exp_ops [] = { const disp_op_t *dsp_exp_ops [] = {
&dsp_set_get_kx_exp, &dsp_set_get_kx_exp,
...@@ -194,6 +206,7 @@ const disp_op_t *dsp_exp_ops [] = { ...@@ -194,6 +206,7 @@ const disp_op_t *dsp_exp_ops [] = {
&dsp_set_get_monit_pos_y_exp, &dsp_set_get_monit_pos_y_exp,
&dsp_set_get_monit_pos_q_exp, &dsp_set_get_monit_pos_q_exp,
&dsp_set_get_monit_pos_sum_exp, &dsp_set_get_monit_pos_sum_exp,
&dsp_set_get_monit_updt_exp,
NULL NULL
}; };
...@@ -24,6 +24,7 @@ extern disp_op_t dsp_set_get_monit_pos_x_exp; ...@@ -24,6 +24,7 @@ extern disp_op_t dsp_set_get_monit_pos_x_exp;
extern disp_op_t dsp_set_get_monit_pos_y_exp; extern disp_op_t dsp_set_get_monit_pos_y_exp;
extern disp_op_t dsp_set_get_monit_pos_q_exp; extern disp_op_t dsp_set_get_monit_pos_q_exp;
extern disp_op_t dsp_set_get_monit_pos_sum_exp; extern disp_op_t dsp_set_get_monit_pos_sum_exp;
extern disp_op_t dsp_set_get_monit_updt_exp;
extern const disp_op_t *dsp_exp_ops []; extern const disp_op_t *dsp_exp_ops [];
......
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