Commit aa119e32 authored by Lucas Russo's avatar Lucas Russo

libs/libbpmclient/*: add trigger mux functions

parent 36b473d7
......@@ -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
......
......@@ -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 */
......
......@@ -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,
......
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