diff --git a/src/libs/libbpmclient/Makefile b/src/libs/libbpmclient/Makefile index 5227825b7caa2b27bc19ab4ebb6aa0dad68d3f8e..3793be52f46415e94424b6bc25b381afc734bd96 100644 --- a/src/libs/libbpmclient/Makefile +++ b/src/libs/libbpmclient/Makefile @@ -106,6 +106,7 @@ OBJS_EXTERNAL = ../../sm_io/modules/sm_io_codes.o \ ../../sm_io/modules/rffe/sm_io_rffe_exports.o \ ../../sm_io/modules/afc_diag/sm_io_afc_diag_exports.o \ ../../sm_io/modules/afc_diag/sm_io_trigger_iface_exports.o \ + ../../sm_io/modules/afc_diag/sm_io_trigger_mux_exports.o # Project boards boards_INCLUDE_DIRS = -I../../../include/boards/$(BOARD) @@ -125,6 +126,7 @@ INCLUDE_DIRS = -I. -Iinclude \ -I../../sm_io/modules/rffe \ -I../../sm_io/modules/afc_diag \ -I../../sm_io/modules/trigger_iface \ + -I../../sm_io/modules/trigger_mux \ -I${PREFIX}/include # Merge all flags. We expect tghese variables to be appended to the possible @@ -159,6 +161,7 @@ $(LIBNAME)_SMIO_CODES = ../../sm_io/modules/fmc130m_4ch/sm_io_fmc130m_4ch_codes. ../../sm_io/modules/rffe/sm_io_rffe_codes.h \ ../../sm_io/modules/afc_diag/sm_io_afc_diag_codes.h \ ../../sm_io/modules/trigger_iface/sm_io_trigger_iface_codes.h \ + ../../sm_io/modules/trigger_mux/sm_io_trigger_mux_codes.h \ ../../sm_io/modules/sm_io_codes.h $(LIBNAME)_SMIO_EXPORTS = ../../sm_io/modules/fmc130m_4ch/sm_io_fmc130m_4ch_exports.h \ @@ -170,7 +173,8 @@ $(LIBNAME)_SMIO_EXPORTS = ../../sm_io/modules/fmc130m_4ch/sm_io_fmc130m_4ch_expo ../../sm_io/modules/swap/sm_io_swap_exports.h \ ../../sm_io/modules/rffe/sm_io_rffe_exports.h \ ../../sm_io/modules/afc_diag/sm_io_afc_diag_exports.h \ - ../../sm_io/modules/trigger_iface/sm_io_trigger_iface_exports.h + ../../sm_io/modules/trigger_iface/sm_io_trigger_iface_exports.h \ + ../../sm_io/modules/trigger_mux/sm_io_trigger_mux_exports.h # Copy specific acq_chan.h defintions according to the BOARD MACRO $(LIBNAME)_ACQ_HEADERS_BASENAME = acq_chan diff --git a/src/libs/libbpmclient/include/bpm_client_core.h b/src/libs/libbpmclient/include/bpm_client_core.h index 933a112b1c4f80d681e98a530006c0307f30a08b..d5b87ea588d49f7e90d78b50562d29373f56470b 100644 --- a/src/libs/libbpmclient/include/bpm_client_core.h +++ b/src/libs/libbpmclient/include/bpm_client_core.h @@ -966,6 +966,48 @@ bpm_client_err_e bpm_set_trigger_count_transm (bpm_client_t *self, char *service bpm_client_err_e bpm_get_trigger_count_transm (bpm_client_t *self, char *service, uint32_t chan, uint32_t *count_transm); +/**************************** Trigger Mux Functions ***************************/ + +/* Trigger Receive Source functions */ +/* These set of functions write (set) or read (get) the trigger source for the + * receiver of a specified channel "chan". + * 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_trigger_rcv_src (bpm_client_t *self, char *service, + uint32_t chan, uint32_t rcv_src); +bpm_client_err_e bpm_get_trigger_rcv_src (bpm_client_t *self, char *service, + uint32_t chan, uint32_t *rcv_src); + +/* Trigger Receive Selection functions */ +/* These set of functions write (set) or read (get) the trigger selection for the + * receiver of a specified channel "chan". + * 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_trigger_rcv_in_sel (bpm_client_t *self, char *service, + uint32_t chan, uint32_t rcv_in_sel); +bpm_client_err_e bpm_get_trigger_rcv_in_sel (bpm_client_t *self, char *service, + uint32_t chan, uint32_t *rcv_in_sel); + +/* Trigger Transmit Source functions */ +/* These set of functions write (set) or read (get) the trigger source for the + * transmitter of a specified channel "chan". + * 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_trigger_transm_src (bpm_client_t *self, char *service, + uint32_t chan, uint32_t transm_src); +bpm_client_err_e bpm_get_trigger_transm_src (bpm_client_t *self, char *service, + uint32_t chan, uint32_t *transm_src); + +/* Trigger Transmit Selection functions */ +/* These set of functions write (set) or read (get) the trigger selection for the + * transmitter of a specified channel "chan". + * 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_trigger_transm_in_sel (bpm_client_t *self, char *service, + uint32_t chan, uint32_t transm_in_sel); +bpm_client_err_e bpm_get_trigger_transm_in_sel (bpm_client_t *self, char *service, + uint32_t chan, uint32_t *transm_in_sel); + /****************************** Helper Functions ****************************/ /* Helper Function */ diff --git a/src/libs/libbpmclient/src/bpm_client_core.c b/src/libs/libbpmclient/src/bpm_client_core.c index bae3b957b83fb9e666e57ded4254115c5dad2967..f98675b022d662470e7d0082df3bf8a363b78fc9 100644 --- a/src/libs/libbpmclient/src/bpm_client_core.c +++ b/src/libs/libbpmclient/src/bpm_client_core.c @@ -1990,6 +1990,60 @@ PARAM_FUNC_CLIENT_WRITE_READ(trigger_count_transm, chan, count_transm) chan, count_transm); } +/********************** Trigger Mux Functions ********************/ + +/* Trigger receive source */ +PARAM_FUNC_CLIENT_WRITE2(trigger_rcv_src, chan, rcv_src) +{ + return param_client_write2 (self, service, TRIGGER_MUX_OPCODE_RCV_SRC, + chan, rcv_src); +} + +PARAM_FUNC_CLIENT_WRITE_READ(trigger_rcv_src, chan, rcv_src) +{ + return param_client_write_read (self, service, TRIGGER_MUX_OPCODE_RCV_SRC, + chan, rcv_src); +} + +/* Trigger receive in selection */ +PARAM_FUNC_CLIENT_WRITE2(trigger_rcv_in_sel, chan, rcv_in_sel) +{ + return param_client_write2 (self, service, TRIGGER_MUX_OPCODE_RCV_IN_SEL, + chan, rcv_in_sel); +} + +PARAM_FUNC_CLIENT_WRITE_READ(trigger_rcv_in_sel, chan, rcv_in_sel) +{ + return param_client_write_read (self, service, TRIGGER_MUX_OPCODE_RCV_IN_SEL, + chan, rcv_in_sel); +} + +/* Trigger transmit source */ +PARAM_FUNC_CLIENT_WRITE2(trigger_transm_src, chan, transm_src) +{ + return param_client_write2 (self, service, TRIGGER_MUX_OPCODE_TRANSM_SRC, + chan, transm_src); +} + +PARAM_FUNC_CLIENT_WRITE_READ(trigger_transm_src, chan, transm_src) +{ + return param_client_write_read (self, service, TRIGGER_MUX_OPCODE_TRANSM_SRC, + chan, transm_src); +} + +/* Trigger transmit selection */ +PARAM_FUNC_CLIENT_WRITE2(trigger_transm_out_sel, chan, transm_out_sel) +{ + return param_client_write2 (self, service, TRIGGER_MUX_OPCODE_TRANSM_OUT_SEL, + chan, transm_out_sel); +} + +PARAM_FUNC_CLIENT_WRITE_READ(trigger_transm_out_sel, chan, transm_out_sel) +{ + return param_client_write_read (self, service, TRIGGER_MUX_OPCODE_TRANSM_OUT_SEL, + chan, transm_out_sel); +} + /**************** Helper Function ****************/ bpm_client_err_e func_polling (bpm_client_t *self, char *name, char *service,