Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
adc-lib
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
adc-lib
Commits
8267c532
Commit
8267c532
authored
Sep 06, 2021
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib: add error for driver incompatibility
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
3c981f75
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
1 deletion
+3
-1
adc-lib.h
lib/adc-lib.h
+1
-0
fmc-adc-100m14b4cha.c
lib/fmc-adc-100m14b4cha.c
+1
-1
lib.c
lib/lib.c
+1
-0
No files found.
lib/adc-lib.h
View file @
8267c532
...
...
@@ -34,6 +34,7 @@ extern "C" {
#define ADC_OFF_AC_RESTORE_S 1037
#define ADC_OFF_AC_RESTORE_R 1038
#define ADC_ENOFLAGS 1039
#define ADC_EDRVVERSION 1040
/**
* Opaque type. any instance of this should be used as token
...
...
lib/fmc-adc-100m14b4cha.c
View file @
8267c532
...
...
@@ -216,7 +216,7 @@ static struct adc_dev *adc_100m14b4cha_open(const struct adc_board_type *b,
int
err
,
bits
;
if
(
!
adc_100m14b4cha_is_driver_compatible
())
{
errno
=
EPERM
;
errno
=
ADC_EDRVVERSION
;
return
NULL
;
}
...
...
lib/lib.c
View file @
8267c532
...
...
@@ -36,6 +36,7 @@ static struct adc_errors {
{
ADC_OFF_AC_RESTORE_S
,
"Offset auto-clear: cannot store configuration"
},
{
ADC_OFF_AC_RESTORE_R
,
"Offset auto-clear: cannot restore configuration"
},
{
ADC_ENOFLAGS
,
"Unsupported flags"
},
{
ADC_EDRVVERSION
,
"Incompatible driver version"
},
{
0
,
}
};
...
...
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