Commit 555cfc75 authored by Lucas Russo's avatar Lucas Russo

sm_io/*/acq/*: add FSM stop command

Now, we can stop the acquisition FSM.
This is useful if we are acquiring data in
triggered mode and we want to abort the
acquisition.
parent 30da56f6
......@@ -39,7 +39,9 @@ struct _smio_acq_data_block_t {
#define ACQ_NAME_HW_TRIG_DLY "acq_hw_trig_dly"
#define ACQ_OPCODE_SW_TRIG 9
#define ACQ_NAME_SW_TRIG "acq_sw_trig"
#define ACQ_OPCODE_END 10
#define ACQ_OPCODE_FSM_STOP 10
#define ACQ_NAME_FSM_STOP "acq_fsm_stop"
#define ACQ_OPCODE_END 11
/* Messaging Reply OPCODES */
#define ACQ_REPLY_TYPE uint32_t
......
......@@ -713,6 +713,14 @@ RW_PARAM_FUNC(acq, sw_trig) {
ACQ_SW_TRIG_MAX, NO_CHK_FUNC, NO_FMT_FUNC, SET_FIELD);
}
#define ACQ_FSM_STOP_MIN 0
#define ACQ_FSM_STOP_MAX 1
RW_PARAM_FUNC(acq, fsm_stop) {
SET_GET_PARAM(acq, WB_ACQ_CORE_CTRL_REGS_OFFS, ACQ_CORE, CTL,
FSM_STOP_ACQ, SINGLE_BIT_PARAM, ACQ_FSM_STOP_MIN,
ACQ_FSM_STOP_MAX, NO_CHK_FUNC, NO_FMT_FUNC, SET_FIELD);
}
/* Exported function pointers */
const disp_table_func_fp acq_exp_fp [] = {
_acq_data_acquire,
......@@ -725,6 +733,7 @@ const disp_table_func_fp acq_exp_fp [] = {
RW_PARAM_FUNC_NAME(acq, hw_data_trig_thres),
RW_PARAM_FUNC_NAME(acq, hw_trig_dly),
RW_PARAM_FUNC_NAME(acq, sw_trig),
RW_PARAM_FUNC_NAME(acq, fsm_stop),
NULL
};
......
......@@ -130,6 +130,18 @@ disp_op_t acq_sw_trig_exp = {
}
};
disp_op_t acq_fsm_stop_exp = {
.name = ACQ_NAME_FSM_STOP,
.opcode = ACQ_OPCODE_FSM_STOP,
.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 */
const disp_op_t *acq_exp_ops [] = {
&acq_data_acquire_exp,
......@@ -142,6 +154,7 @@ const disp_op_t *acq_exp_ops [] = {
&acq_hw_data_trig_thres_exp,
&acq_hw_trig_dly_exp,
&acq_sw_trig_exp,
&acq_fsm_stop_exp,
NULL
};
......@@ -20,6 +20,7 @@ extern disp_op_t acq_hw_data_trig_filt_exp;
extern disp_op_t acq_hw_data_trig_thres_exp;
extern disp_op_t acq_hw_trig_dly_exp;
extern disp_op_t acq_sw_trig_exp;
extern disp_op_t acq_fsm_stop_exp;
extern const disp_op_t *acq_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