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
9bc86782
Commit
9bc86782
authored
Mar 03, 2015
by
Lucas Russo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libclient/*: add ADC LTC2208 functions
This is part of github issue #83
parent
7143dfec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
0 deletions
+67
-0
bpm_client.c
libclient/bpm_client.c
+44
-0
bpm_client.h
libclient/bpm_client.h
+23
-0
No files found.
libclient/bpm_client.c
View file @
9bc86782
...
...
@@ -208,6 +208,50 @@ err_send_msg_alloc:
return
err
;
}
/* ADC LTC2208 RAND */
PARAM_FUNC_CLIENT_WRITE
(
adc_rand
)
{
return
param_client_write
(
self
,
service
,
FMC130M_4CH_OPCODE_ADC_RAND
,
adc_rand
);
}
PARAM_FUNC_CLIENT_READ
(
adc_rand
)
{
return
param_client_read
(
self
,
service
,
FMC130M_4CH_OPCODE_ADC_RAND
,
adc_rand
);
}
/* ADC LTC2208 DITH */
PARAM_FUNC_CLIENT_WRITE
(
adc_dith
)
{
return
param_client_write
(
self
,
service
,
FMC130M_4CH_OPCODE_ADC_DITH
,
adc_dith
);
}
PARAM_FUNC_CLIENT_READ
(
adc_dith
)
{
return
param_client_read
(
self
,
service
,
FMC130M_4CH_OPCODE_ADC_DITH
,
adc_dith
);
}
/* ADC LTC2208 SHDN */
PARAM_FUNC_CLIENT_WRITE
(
adc_shdn
)
{
return
param_client_write
(
self
,
service
,
FMC130M_4CH_OPCODE_ADC_SHDN
,
adc_shdn
);
}
PARAM_FUNC_CLIENT_READ
(
adc_shdn
)
{
return
param_client_read
(
self
,
service
,
FMC130M_4CH_OPCODE_ADC_SHDN
,
adc_shdn
);
}
/* ADC LTC2208 PGA */
PARAM_FUNC_CLIENT_WRITE
(
adc_pga
)
{
return
param_client_write
(
self
,
service
,
FMC130M_4CH_OPCODE_ADC_PGA
,
adc_pga
);
}
PARAM_FUNC_CLIENT_READ
(
adc_pga
)
{
return
param_client_read
(
self
,
service
,
FMC130M_4CH_OPCODE_ADC_PGA
,
adc_pga
);
}
/* RAW ADC data 0 value */
PARAM_FUNC_CLIENT_WRITE
(
adc_data0
)
{
...
...
libclient/bpm_client.h
View file @
9bc86782
...
...
@@ -89,6 +89,29 @@ bpm_client_err_e bpm_set_fmc_clk_sel (bpm_client_t *self, char *service,
bpm_client_err_e
bpm_get_fmc_clk_sel
(
bpm_client_t
*
self
,
char
*
service
,
uint32_t
*
clk_sel
);
/* ADC LTC2208 Control */
/* These set of functions read (get) or write (set) some ADC LTC2208
* functionalities. Check LTC2208 datasheet for details.
* 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_adc_rand
(
bpm_client_t
*
self
,
char
*
service
,
uint32_t
adc_rand
);
bpm_client_err_e
bpm_get_adc_rand
(
bpm_client_t
*
self
,
char
*
service
,
uint32_t
*
adc_rand
);
bpm_client_err_e
bpm_set_adc_dith
(
bpm_client_t
*
self
,
char
*
service
,
uint32_t
adc_dith
);
bpm_client_err_e
bpm_get_adc_dith
(
bpm_client_t
*
self
,
char
*
service
,
uint32_t
*
adc_dith
);
bpm_client_err_e
bpm_set_adc_shdn
(
bpm_client_t
*
self
,
char
*
service
,
uint32_t
adc_shdn
);
bpm_client_err_e
bpm_get_adc_shdn
(
bpm_client_t
*
self
,
char
*
service
,
uint32_t
*
adc_shdn
);
bpm_client_err_e
bpm_set_adc_pga
(
bpm_client_t
*
self
,
char
*
service
,
uint32_t
adc_pga
);
bpm_client_err_e
bpm_get_adc_pga
(
bpm_client_t
*
self
,
char
*
service
,
uint32_t
*
adc_pga
);
/* RAW ADC data functions */
/* These set of functions read (get) the RAW ADC values.
* All of the functions returns BPM_CLIENT_SUCCESS if the
...
...
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