Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
FMC ADC 100M 14b 4cha - Software
Commits
4cd5d639
Commit
4cd5d639
authored
Aug 06, 2020
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drv: rename function to set DAC offset on HW
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
17e68283
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
fa-core.c
kernel/fa-core.c
+6
-6
No files found.
kernel/fa-core.c
View file @
4cd5d639
...
...
@@ -146,16 +146,16 @@ int zfad_pattern_data_enable(struct fa_dev *fa, uint16_t pattern,
/**
* It sets the DAC voltage to apply an offset on the input channel
* @chan
* @fa ADC device
* @chan channel number
* @val DAC values (-5V: 0x0000, 0V: 0x8000, +5V: 0x7FFF)
*
* Return: 0 on success, otherwise a negative error number
*/
static
int
zfad_dac_set
(
struct
zio_channel
*
chan
,
uint32_t
val
)
static
int
fa_dac_offset_set
(
struct
fa_dev
*
fa
,
unsigned
int
chan
,
uint32_t
val
)
{
struct
fa_dev
*
fa
=
get_zfadc
(
&
chan
->
cset
->
zdev
->
head
.
dev
);
return
fa_spi_xfer
(
fa
,
FA_SPI_SS_DAC
(
chan
->
index
),
16
,
val
,
NULL
);
return
fa_spi_xfer
(
fa
,
FA_SPI_SS_DAC
(
chan
),
16
,
val
,
NULL
);
}
static
int64_t
fa_dac_offset_raw_get
(
int32_t
offset
)
...
...
@@ -230,7 +230,7 @@ int zfad_apply_offset(struct zio_channel *chan)
cal
->
gain
[
chan
->
index
],
cal
->
offset
[
chan
->
index
]);
return
zfad_dac_set
(
chan
,
hwval
);
return
fa_dac_offset_set
(
fa
,
chan
->
index
,
hwval
);
}
/*
...
...
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