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
303655eb
Commit
303655eb
authored
Feb 24, 2016
by
Lucas Russo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sm_io/*/fmc250m_4ch/*: add RST ADCs and RST DIV ADCs functionality
parent
9d46d117
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
7 deletions
+58
-7
sm_io_fmc250m_4ch_codes.h
src/sm_io/modules/fmc250m_4ch/sm_io_fmc250m_4ch_codes.h
+5
-1
sm_io_fmc250m_4ch_exp.c
src/sm_io/modules/fmc250m_4ch/sm_io_fmc250m_4ch_exp.c
+25
-6
sm_io_fmc250m_4ch_exports.c
src/sm_io/modules/fmc250m_4ch/sm_io_fmc250m_4ch_exports.c
+26
-0
sm_io_fmc250m_4ch_exports.h
src/sm_io/modules/fmc250m_4ch/sm_io_fmc250m_4ch_exports.h
+2
-0
No files found.
src/sm_io/modules/fmc250m_4ch/sm_io_fmc250m_4ch_codes.h
View file @
303655eb
...
...
@@ -106,7 +106,11 @@
#define FMC250M_4CH_NAME_SI571_SET_FREQ "fmc250m_4ch_si571_set_freq"
#define FMC250M_4CH_OPCODE_SI571_GET_DEFAULTS 44
#define FMC250M_4CH_NAME_SI571_GET_DEFAULTS "fmc250m_4ch_si571_get_defaults"
#define FMC250M_4CH_OPCODE_END 45
#define FMC250M_4CH_OPCODE_RST_ADCS 45
#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_END 47
/* Messaging Reply OPCODES */
#define FMC250M_4CH_REPLY_TYPE uint32_t
...
...
src/sm_io/modules/fmc250m_4ch/sm_io_fmc250m_4ch_exp.c
View file @
303655eb
...
...
@@ -114,12 +114,6 @@ RW_PARAM_FUNC(fmc250m_4ch, clk_sel) {
NO_FMT_FUNC
,
SET_FIELD
);
}
/***************************** ADC ISLA216P Control ***************************/
#if 0
#endif
/********************* ADC RAW Data registers (for simple debug) **************/
/* FIXME: Override DATA<channel_number>_VAL macros with the DATA_GLOBAL ones.
...
...
@@ -611,6 +605,29 @@ FMC250M_4CH_SI571_FUNC_NAME_HEADER(get_defaults)
"Could not restart SI571 to its defaults"
);
}
/***************************** ADC ISLA216P Control ***************************/
#define BPM_FMC250M_4CH_RST_ADCS_MIN 0
/* Do nothing on RST_ADCS pin */
#define BPM_FMC250M_4CH_RST_ADCS_MAX 1
/* Pulse RST_ADCS pin */
RW_PARAM_FUNC
(
fmc250m_4ch
,
rst_adcs
)
{
SET_GET_PARAM
(
fmc250m_4ch
,
FMC_250M_CTRL_REGS_OFFS
,
WB_FMC_250M_4CH_CSR
,
ADC_CTL
,
RST_ADCS
,
SINGLE_BIT_PARAM
,
BPM_FMC250M_4CH_RST_ADCS_MIN
,
BPM_FMC250M_4CH_RST_ADCS_MAX
,
NO_CHK_FUNC
,
NO_FMT_FUNC
,
SET_FIELD
);
}
#define BPM_FMC250M_4CH_RST_DIV_ADCS_MIN 0
/* Do nothing on RST_DIV_ADCS pin */
#define BPM_FMC250M_4CH_RST_DIV_ADCS_MAX 1
/* Pulse RST_DIV_ADCS pin */
RW_PARAM_FUNC
(
fmc250m_4ch
,
rst_div_adcs
)
{
SET_GET_PARAM
(
fmc250m_4ch
,
FMC_250M_CTRL_REGS_OFFS
,
WB_FMC_250M_4CH_CSR
,
ADC_CTL
,
RST_DIV_ADCS
,
SINGLE_BIT_PARAM
,
BPM_FMC250M_4CH_RST_DIV_ADCS_MIN
,
BPM_FMC250M_4CH_RST_DIV_ADCS_MAX
,
NO_CHK_FUNC
,
NO_FMT_FUNC
,
SET_FIELD
);
}
/* Exported function pointers */
const
disp_table_func_fp
fmc250m_4ch_exp_fp
[]
=
{
RW_PARAM_FUNC_NAME
(
fmc250m_4ch
,
leds
),
...
...
@@ -662,6 +679,8 @@ const disp_table_func_fp fmc250m_4ch_exp_fp [] = {
FMC250M_4CH_AD9510_FUNC_NAME
(
pll_clk_sel
),
FMC250M_4CH_SI571_FUNC_NAME
(
set_freq
),
FMC250M_4CH_SI571_FUNC_NAME
(
get_defaults
),
RW_PARAM_FUNC_NAME
(
fmc250m_4ch
,
rst_adcs
),
RW_PARAM_FUNC_NAME
(
fmc250m_4ch
,
rst_div_adcs
),
NULL
};
...
...
src/sm_io/modules/fmc250m_4ch/sm_io_fmc250m_4ch_exports.c
View file @
303655eb
...
...
@@ -71,6 +71,30 @@ disp_op_t fmc250m_4ch_clk_sel_exp = {
}
};
disp_op_t
fmc250m_4ch_rst_adcs_exp
=
{
.
name
=
FMC250M_4CH_NAME_RST_ADCS
,
.
opcode
=
FMC250M_4CH_OPCODE_RST_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
}
};
disp_op_t
fmc250m_4ch_rst_div_adcs_exp
=
{
.
name
=
FMC250M_4CH_NAME_RST_DIV_ADCS
,
.
opcode
=
FMC250M_4CH_OPCODE_RST_DIV_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,
...
...
@@ -607,6 +631,8 @@ const disp_op_t *fmc250m_4ch_exp_ops [] = {
&
fmc250m_4ch_ad9510_pll_clk_sel_exp
,
&
fmc250m_4ch_si571_set_freq_exp
,
&
fmc250m_4ch_si571_get_defaults_exp
,
&
fmc250m_4ch_rst_adcs_exp
,
&
fmc250m_4ch_rst_div_adcs_exp
,
NULL
};
src/sm_io/modules/fmc250m_4ch/sm_io_fmc250m_4ch_exports.h
View file @
303655eb
...
...
@@ -59,6 +59,8 @@ extern disp_op_t fmc250m_4ch_ad9510_outputs_exp;
extern
disp_op_t
fmc250m_4ch_ad9510_pll_clk_sel_exp
;
extern
disp_op_t
fmc250m_4ch_si571_set_freq_exp
;
extern
disp_op_t
fmc250m_4ch_si571_get_defaults_exp
;
extern
disp_op_t
fmc250m_4ch_rst_adcs_exp
;
extern
disp_op_t
fmc250m_4ch_rst_div_adcs_exp
;
extern
const
disp_op_t
*
fmc250m_4ch_exp_ops
[];
...
...
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