Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
etherlabmaster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ICS Control System Infrastructure
etherlabmaster
Commits
d093fbe3
Commit
d093fbe3
authored
16 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
Added ec_sdo_get_entry_const().
parent
2aea597d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
master/sdo.c
+28
-2
28 additions, 2 deletions
master/sdo.c
master/sdo.h
+1
-0
1 addition, 0 deletions
master/sdo.h
with
29 additions
and
2 deletions
master/sdo.c
+
28
−
2
View file @
d093fbe3
...
@@ -154,7 +154,7 @@ void ec_sdo_clear(
...
@@ -154,7 +154,7 @@ void ec_sdo_clear(
/*****************************************************************************/
/*****************************************************************************/
/** Get an
d
Sdo entry from an Sdo via its subindex.
/** Get an Sdo entry from an Sdo via its subindex.
*
*
* \retval >0 Pointer to the requested Sdo entry.
* \retval >0 Pointer to the requested Sdo entry.
* \retval NULL Sdo entry not found.
* \retval NULL Sdo entry not found.
...
@@ -167,7 +167,33 @@ ec_sdo_entry_t *ec_sdo_get_entry(
...
@@ -167,7 +167,33 @@ ec_sdo_entry_t *ec_sdo_get_entry(
ec_sdo_entry_t
*
entry
;
ec_sdo_entry_t
*
entry
;
list_for_each_entry
(
entry
,
&
sdo
->
entries
,
list
)
{
list_for_each_entry
(
entry
,
&
sdo
->
entries
,
list
)
{
if
(
entry
->
subindex
!=
subindex
)
continue
;
if
(
entry
->
subindex
!=
subindex
)
continue
;
return
entry
;
}
return
NULL
;
}
/*****************************************************************************/
/** Get an Sdo entry from an Sdo via its subindex.
*
* const version.
*
* \retval >0 Pointer to the requested Sdo entry.
* \retval NULL Sdo entry not found.
*/
const
ec_sdo_entry_t
*
ec_sdo_get_entry_const
(
const
ec_sdo_t
*
sdo
,
/**< Sdo. */
uint8_t
subindex
/**< Entry subindex. */
)
{
const
ec_sdo_entry_t
*
entry
;
list_for_each_entry
(
entry
,
&
sdo
->
entries
,
list
)
{
if
(
entry
->
subindex
!=
subindex
)
continue
;
return
entry
;
return
entry
;
}
}
...
...
This diff is collapsed.
Click to expand it.
master/sdo.h
+
1
−
0
View file @
d093fbe3
...
@@ -68,6 +68,7 @@ int ec_sdo_init(ec_sdo_t *, uint16_t, ec_slave_t *);
...
@@ -68,6 +68,7 @@ int ec_sdo_init(ec_sdo_t *, uint16_t, ec_slave_t *);
void
ec_sdo_destroy
(
ec_sdo_t
*
);
void
ec_sdo_destroy
(
ec_sdo_t
*
);
ec_sdo_entry_t
*
ec_sdo_get_entry
(
ec_sdo_t
*
,
uint8_t
);
ec_sdo_entry_t
*
ec_sdo_get_entry
(
ec_sdo_t
*
,
uint8_t
);
const
ec_sdo_entry_t
*
ec_sdo_get_entry_const
(
const
ec_sdo_t
*
,
uint8_t
);
/*****************************************************************************/
/*****************************************************************************/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment