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
0a15ba49
Commit
0a15ba49
authored
18 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
Renamed ec_sii_pdo_t and ec_sii_pdo_entry_t to ec_pdo_t and
ec_pdo_entry_t, respectively.
parent
e7ee08b6
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
master/domain.c
+6
-6
6 additions, 6 deletions
master/domain.c
master/slave.c
+11
-13
11 additions, 13 deletions
master/slave.c
master/slave.h
+7
-7
7 additions, 7 deletions
master/slave.h
with
24 additions
and
26 deletions
master/domain.c
+
6
−
6
View file @
0a15ba49
...
...
@@ -188,8 +188,8 @@ void ec_domain_clear(struct kobject *kobj /**< kobject of the domain */)
int
ec_domain_reg_pdo_entry
(
ec_domain_t
*
domain
,
/**< EtherCAT domain */
ec_slave_t
*
slave
,
/**< slave */
const
ec_
sii_
pdo_t
*
pdo
,
/**< PDO */
const
ec_
sii_
pdo_entry_t
*
entry
,
const
ec_pdo_t
*
pdo
,
/**< PDO */
const
ec_pdo_entry_t
*
entry
,
/**< PDO registration entry */
void
**
data_ptr
/**< pointer to the process data
pointer */
...
...
@@ -197,8 +197,8 @@ int ec_domain_reg_pdo_entry(ec_domain_t *domain, /**< EtherCAT domain */
{
ec_data_reg_t
*
data_reg
;
const
ec_sii_sync_t
*
sync
;
const
ec_
sii_
pdo_t
*
other_pdo
;
const
ec_
sii_
pdo_entry_t
*
other_entry
;
const
ec_pdo_t
*
other_pdo
;
const
ec_pdo_entry_t
*
other_entry
;
unsigned
int
bit_offset
,
byte_offset
;
// Find sync manager for PDO
...
...
@@ -499,8 +499,8 @@ ec_slave_t *ecrt_domain_register_pdo(ec_domain_t *domain,
{
ec_slave_t
*
slave
;
ec_master_t
*
master
;
const
ec_
sii_
pdo_t
*
pdo
;
const
ec_
sii_
pdo_entry_t
*
entry
;
const
ec_pdo_t
*
pdo
;
const
ec_pdo_entry_t
*
entry
;
master
=
domain
->
master
;
...
...
This diff is collapsed.
Click to expand it.
master/slave.c
+
11
−
13
View file @
0a15ba49
...
...
@@ -241,8 +241,8 @@ void ec_slave_destroy(ec_slave_t *slave /**< EtherCAT slave */)
void
ec_slave_clear
(
struct
kobject
*
kobj
/**< kobject of the slave */
)
{
ec_slave_t
*
slave
;
ec_
sii_
pdo_t
*
pdo
,
*
next_pdo
;
ec_
sii_
pdo_entry_t
*
entry
,
*
next_ent
;
ec_pdo_t
*
pdo
,
*
next_pdo
;
ec_pdo_entry_t
*
entry
,
*
next_ent
;
ec_sdo_data_t
*
sdodata
,
*
next_sdodata
;
unsigned
int
i
;
...
...
@@ -519,16 +519,15 @@ int ec_slave_fetch_sii_pdos(
ec_slave_t
*
slave
,
/**< EtherCAT slave */
const
uint8_t
*
data
,
/**< category data */
size_t
word_count
,
/**< number of words */
ec_
sii_
pdo_type_t
pdo_type
/**< PDO type */
ec_pdo_type_t
pdo_type
/**< PDO type */
)
{
ec_
sii_
pdo_t
*
pdo
;
ec_
sii_
pdo_entry_t
*
entry
;
ec_pdo_t
*
pdo
;
ec_pdo_entry_t
*
entry
;
unsigned
int
entry_count
,
i
;
while
(
word_count
>=
4
)
{
if
(
!
(
pdo
=
(
ec_sii_pdo_t
*
)
kmalloc
(
sizeof
(
ec_sii_pdo_t
),
GFP_ATOMIC
)))
{
if
(
!
(
pdo
=
kmalloc
(
sizeof
(
ec_pdo_t
),
GFP_KERNEL
)))
{
EC_ERR
(
"Failed to allocate PDO memory.
\n
"
);
return
-
1
;
}
...
...
@@ -547,8 +546,7 @@ int ec_slave_fetch_sii_pdos(
data
+=
8
;
for
(
i
=
0
;
i
<
entry_count
;
i
++
)
{
if
(
!
(
entry
=
(
ec_sii_pdo_entry_t
*
)
kmalloc
(
sizeof
(
ec_sii_pdo_entry_t
),
GFP_ATOMIC
)))
{
if
(
!
(
entry
=
kmalloc
(
sizeof
(
ec_pdo_entry_t
),
GFP_KERNEL
)))
{
EC_ERR
(
"Failed to allocate PDO entry memory.
\n
"
);
return
-
1
;
}
...
...
@@ -657,8 +655,8 @@ size_t ec_slave_info(const ec_slave_t *slave, /**< EtherCAT slave */
{
off_t
off
=
0
;
ec_sii_sync_t
*
sync
;
ec_
sii_
pdo_t
*
pdo
;
ec_
sii_
pdo_entry_t
*
pdo_entry
;
ec_pdo_t
*
pdo
;
ec_pdo_entry_t
*
pdo_entry
;
int
first
,
i
;
ec_sdo_data_t
*
sdodata
;
char
str
[
20
];
...
...
@@ -1073,8 +1071,8 @@ uint16_t ec_slave_calc_sync_size(const ec_slave_t *slave,
/**< sync manager */
)
{
ec_
sii_
pdo_t
*
pdo
;
ec_
sii_
pdo_entry_t
*
pdo_entry
;
ec_pdo_t
*
pdo
;
ec_pdo_entry_t
*
pdo_entry
;
unsigned
int
bit_size
,
byte_size
;
if
(
sync
->
length
)
return
sync
->
length
;
...
...
This diff is collapsed.
Click to expand it.
master/slave.h
+
7
−
7
View file @
0a15ba49
...
...
@@ -124,29 +124,29 @@ typedef enum
EC_RX_PDO
,
/**< Reveive PDO */
EC_TX_PDO
/**< Transmit PDO */
}
ec_
sii_
pdo_type_t
;
ec_pdo_type_t
;
/*****************************************************************************/
/**
PDO description
(EEPROM)
.
PDO description.
*/
typedef
struct
{
struct
list_head
list
;
/**< list item */
ec_
sii_
pdo_type_t
type
;
/**< PDO type */
ec_pdo_type_t
type
;
/**< PDO type */
uint16_t
index
;
/**< PDO index */
uint8_t
sync_index
;
/**< assigned sync manager */
char
*
name
;
/**< PDO name */
struct
list_head
entries
;
/**< entry list */
}
ec_
sii_
pdo_t
;
ec_pdo_t
;
/*****************************************************************************/
/**
PDO entry description
(EEPROM)
.
PDO entry description.
*/
typedef
struct
...
...
@@ -157,7 +157,7 @@ typedef struct
char
*
name
;
/**< entry name */
uint8_t
bit_length
;
/**< entry length in bit */
}
ec_
sii_
pdo_entry_t
;
ec_pdo_entry_t
;
/*****************************************************************************/
...
...
@@ -267,7 +267,7 @@ int ec_slave_fetch_sii_strings(ec_slave_t *, const uint8_t *);
void
ec_slave_fetch_sii_general
(
ec_slave_t
*
,
const
uint8_t
*
);
int
ec_slave_fetch_sii_syncs
(
ec_slave_t
*
,
const
uint8_t
*
,
size_t
);
int
ec_slave_fetch_sii_pdos
(
ec_slave_t
*
,
const
uint8_t
*
,
size_t
,
ec_
sii_
pdo_type_t
);
ec_pdo_type_t
);
// misc.
ec_sii_sync_t
*
ec_slave_get_pdo_sync
(
ec_slave_t
*
,
ec_direction_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