Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
Beam Positoning Monitor - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Beam Positoning Monitor - Software
Commits
e8ecada8
Commit
e8ecada8
authored
May 06, 2016
by
Lucas Russo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sm_io/modules/fmc250m_4ch/*: add ADC Sleep function
parent
13db8b2b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
5 deletions
+37
-5
sm_io_fmc250m_4ch_codes.h
src/sm_io/modules/fmc250m_4ch/sm_io_fmc250m_4ch_codes.h
+7
-5
sm_io_fmc250m_4ch_defaults.c
src/sm_io/modules/fmc250m_4ch/sm_io_fmc250m_4ch_defaults.c
+4
-0
sm_io_fmc250m_4ch_defaults.h
src/sm_io/modules/fmc250m_4ch/sm_io_fmc250m_4ch_defaults.h
+1
-0
sm_io_fmc250m_4ch_exp.c
src/sm_io/modules/fmc250m_4ch/sm_io_fmc250m_4ch_exp.c
+11
-0
sm_io_fmc250m_4ch_exports.c
src/sm_io/modules/fmc250m_4ch/sm_io_fmc250m_4ch_exports.c
+13
-0
sm_io_fmc250m_4ch_exports.h
src/sm_io/modules/fmc250m_4ch/sm_io_fmc250m_4ch_exports.h
+1
-0
No files found.
src/sm_io/modules/fmc250m_4ch/sm_io_fmc250m_4ch_codes.h
View file @
e8ecada8
...
...
@@ -68,15 +68,17 @@
#define FMC250M_4CH_NAME_RST_ADCS "fmc250m_4ch_rst_adcs"
#define FMC250M_4CH_OPCODE_RST_DIV_ADCS 46
#define FMC250M_4CH_NAME_RST_DIV_ADCS "fmc250m_4ch_rst_div_adcs"
#define FMC250M_4CH_OPCODE_TESTMODE0 47
#define FMC250M_4CH_OPCODE_SLEEP_ADCS 47
#define FMC250M_4CH_NAME_SLEEP_ADCS "fmc250m_4ch_sleep_adcs"
#define FMC250M_4CH_OPCODE_TESTMODE0 48
#define FMC250M_4CH_NAME_TESTMODE0 "fmc250m_4ch_test_mode0"
#define FMC250M_4CH_OPCODE_TESTMODE1 4
8
#define FMC250M_4CH_OPCODE_TESTMODE1 4
9
#define FMC250M_4CH_NAME_TESTMODE1 "fmc250m_4ch_test_mode1"
#define FMC250M_4CH_OPCODE_TESTMODE2
49
#define FMC250M_4CH_OPCODE_TESTMODE2
50
#define FMC250M_4CH_NAME_TESTMODE2 "fmc250m_4ch_test_mode2"
#define FMC250M_4CH_OPCODE_TESTMODE3 5
0
#define FMC250M_4CH_OPCODE_TESTMODE3 5
1
#define FMC250M_4CH_NAME_TESTMODE3 "fmc350m_4ch_test_mode3"
#define FMC250M_4CH_OPCODE_END 5
1
#define FMC250M_4CH_OPCODE_END 5
2
/* Messaging Reply OPCODES */
#define FMC250M_4CH_REPLY_TYPE uint32_t
...
...
src/sm_io/modules/fmc250m_4ch/sm_io_fmc250m_4ch_defaults.c
View file @
e8ecada8
...
...
@@ -63,6 +63,10 @@ smio_err_e fmc250m_4ch_config_defaults (char *broker_endp, char *service,
ASSERT_TEST
(
client_err
==
BPM_CLIENT_SUCCESS
,
"Could not reset DIV CLK ADCs"
,
err_param_set
,
SMIO_ERR_CONFIG_DFLT
);
client_err
=
bpm_set_sleep_adcs
(
config_client
,
service
,
FMC250M_4CH_DFLT_SLEEP_ADCS
);
ASSERT_TEST
(
client_err
==
BPM_CLIENT_SUCCESS
,
"Could set activate ADCs"
,
err_param_set
,
SMIO_ERR_CONFIG_DFLT
);
err_param_set:
bpm_client_destroy
(
&
config_client
);
err_alloc_client:
...
...
src/sm_io/modules/fmc250m_4ch/sm_io_fmc250m_4ch_defaults.h
View file @
e8ecada8
...
...
@@ -13,6 +13,7 @@
#define FMC250M_4CH_DFLT_RST_ADCS 0x1
#define FMC250M_4CH_DFLT_RST_DIV_ADCS 0x1
#define FMC250M_4CH_DFLT_SLEEP_ADCS 0x0
smio_err_e
fmc250m_4ch_config_defaults
(
char
*
broker_endp
,
char
*
service
,
const
char
*
log_file_name
);
...
...
src/sm_io/modules/fmc250m_4ch/sm_io_fmc250m_4ch_exp.c
View file @
e8ecada8
...
...
@@ -335,6 +335,16 @@ RW_PARAM_FUNC(fmc250m_4ch, rst_div_adcs) {
NO_FMT_FUNC
,
SET_FIELD
);
}
#define BPM_FMC250M_4CH_SLEEP_ADCS_MIN 0
/* Do nothing on SLEEP_ADCS pin */
#define BPM_FMC250M_4CH_SLEEP_ADCS_MAX 1
/* Pulse SLEEP_ADCS pin */
RW_PARAM_FUNC
(
fmc250m_4ch
,
sleep_adcs
)
{
SET_GET_PARAM
(
fmc250m_4ch
,
FMC_250M_CTRL_REGS_OFFS
,
WB_FMC_250M_4CH_CSR
,
ADC_CTL
,
SLEEP_ADCS
,
SINGLE_BIT_PARAM
,
BPM_FMC250M_4CH_SLEEP_ADCS_MIN
,
BPM_FMC250M_4CH_SLEEP_ADCS_MAX
,
NO_CHK_FUNC
,
NO_FMT_FUNC
,
SET_FIELD
);
}
/* Macros to avoid repetition of the function body ISLA216P */
typedef
smch_err_e
(
*
smch_isla216p_func_fp
)
(
smch_isla216p_t
*
self
,
uint32_t
*
param
);
...
...
@@ -474,6 +484,7 @@ const disp_table_func_fp fmc250m_4ch_exp_fp [] = {
#endif
RW_PARAM_FUNC_NAME
(
fmc250m_4ch
,
rst_adcs
),
RW_PARAM_FUNC_NAME
(
fmc250m_4ch
,
rst_div_adcs
),
RW_PARAM_FUNC_NAME
(
fmc250m_4ch
,
sleep_adcs
),
FMC250M_4CH_ISLA216P_FUNC_NAME
(
test_mode0
),
FMC250M_4CH_ISLA216P_FUNC_NAME
(
test_mode1
),
FMC250M_4CH_ISLA216P_FUNC_NAME
(
test_mode2
),
...
...
src/sm_io/modules/fmc250m_4ch/sm_io_fmc250m_4ch_exports.c
View file @
e8ecada8
...
...
@@ -34,6 +34,18 @@ disp_op_t fmc250m_4ch_rst_div_adcs_exp = {
}
};
disp_op_t
fmc250m_4ch_sleep_adcs_exp
=
{
.
name
=
FMC250M_4CH_NAME_SLEEP_ADCS
,
.
opcode
=
FMC250M_4CH_OPCODE_SLEEP_ADCS
,
.
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
}
};
#if 0
disp_op_t fmc250m_4ch_adc_rand_exp = {
.name = FMC250M_4CH_NAME_ADC_RAND,
...
...
@@ -407,6 +419,7 @@ const disp_op_t *fmc250m_4ch_exp_ops [] = {
#endif
&
fmc250m_4ch_rst_adcs_exp
,
&
fmc250m_4ch_rst_div_adcs_exp
,
&
fmc250m_4ch_sleep_adcs_exp
,
&
fmc250m_4ch_test_mode0_exp
,
&
fmc250m_4ch_test_mode1_exp
,
&
fmc250m_4ch_test_mode2_exp
,
...
...
src/sm_io/modules/fmc250m_4ch/sm_io_fmc250m_4ch_exports.h
View file @
e8ecada8
...
...
@@ -40,6 +40,7 @@ extern disp_op_t fmc250m_4ch_adc_dly3_exp;
#endif
extern
disp_op_t
fmc250m_4ch_rst_adcs_exp
;
extern
disp_op_t
fmc250m_4ch_rst_div_adcs_exp
;
extern
disp_op_t
fmc250m_4ch_sleep_adcs_exp
;
extern
disp_op_t
fmc250m_4ch_test_mode0_exp
;
extern
disp_op_t
fmc250m_4ch_test_mode1_exp
;
extern
disp_op_t
fmc250m_4ch_test_mode2_exp
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment