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
c4fe3fba
Commit
c4fe3fba
authored
18 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
Renamed ec_sii_sync_t to ec_sync_t.
parent
0a15ba49
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
+3
-3
3 additions, 3 deletions
master/domain.c
master/slave.c
+7
-7
7 additions, 7 deletions
master/slave.c
master/slave.h
+14
-9
14 additions, 9 deletions
master/slave.h
with
24 additions
and
19 deletions
master/domain.c
+
3
−
3
View file @
c4fe3fba
...
...
@@ -54,7 +54,7 @@ typedef struct
{
struct
list_head
list
;
/**< list item */
ec_slave_t
*
slave
;
/**< slave */
const
ec_
sii_
sync_t
*
sync
;
/**< sync manager */
const
ec_sync_t
*
sync
;
/**< sync manager */
off_t
sync_offset
;
/**< pdo offset */
void
**
data_ptr
;
/**< pointer to process data pointer(s) */
}
...
...
@@ -196,7 +196,7 @@ 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_sync_t
*
sync
;
const
ec_pdo_t
*
other_pdo
;
const
ec_pdo_entry_t
*
other_entry
;
unsigned
int
bit_offset
,
byte_offset
;
...
...
@@ -265,7 +265,7 @@ int ec_domain_reg_pdo_range(ec_domain_t *domain, /**< EtherCAT domain */
)
{
ec_data_reg_t
*
data_reg
;
ec_
sii_
sync_t
*
sync
;
ec_sync_t
*
sync
;
uint16_t
sync_length
;
if
(
!
(
sync
=
ec_slave_get_pdo_sync
(
slave
,
dir
)))
{
...
...
This diff is collapsed.
Click to expand it.
master/slave.c
+
7
−
7
View file @
c4fe3fba
...
...
@@ -482,12 +482,12 @@ int ec_slave_fetch_sii_syncs(
)
{
unsigned
int
i
;
ec_
sii_
sync_t
*
sync
;
ec_sync_t
*
sync
;
// sync manager struct is 4 words long
slave
->
sii_sync_count
=
word_count
/
4
;
if
(
!
(
slave
->
sii_syncs
=
kmalloc
(
sizeof
(
ec_
sii_
sync_t
)
*
if
(
!
(
slave
->
sii_syncs
=
kmalloc
(
sizeof
(
ec_sync_t
)
*
slave
->
sii_sync_count
,
GFP_ATOMIC
)))
{
EC_ERR
(
"Failed to allocate Sync-Manager memory.
\n
"
);
return
-
1
;
...
...
@@ -608,7 +608,7 @@ char *ec_slave_sii_string(
int
ec_slave_prepare_fmmu
(
ec_slave_t
*
slave
,
/**< EtherCAT slave */
const
ec_domain_t
*
domain
,
/**< domain */
const
ec_
sii_
sync_t
*
sync
/**< sync manager */
const
ec_sync_t
*
sync
/**< sync manager */
)
{
unsigned
int
i
;
...
...
@@ -654,7 +654,7 @@ size_t ec_slave_info(const ec_slave_t *slave, /**< EtherCAT slave */
)
{
off_t
off
=
0
;
ec_
sii_
sync_t
*
sync
;
ec_sync_t
*
sync
;
ec_pdo_t
*
pdo
;
ec_pdo_entry_t
*
pdo_entry
;
int
first
,
i
;
...
...
@@ -1067,7 +1067,7 @@ ssize_t ec_store_slave_attribute(struct kobject *kobj, /**< slave's kobject */
uint16_t
ec_slave_calc_sync_size
(
const
ec_slave_t
*
slave
,
/**< EtherCAT slave */
const
ec_
sii_
sync_t
*
sync
const
ec_sync_t
*
sync
/**< sync manager */
)
{
...
...
@@ -1100,7 +1100,7 @@ uint16_t ec_slave_calc_sync_size(const ec_slave_t *slave,
/**
*/
ec_
sii_
sync_t
*
ec_slave_get_pdo_sync
(
ec_sync_t
*
ec_slave_get_pdo_sync
(
ec_slave_t
*
slave
,
/**< EtherCAT slave */
ec_direction_t
dir
/**< input or output */
)
...
...
@@ -1133,7 +1133,7 @@ ec_sii_sync_t *ec_slave_get_pdo_sync(
*/
void
ec_slave_sync_config
(
const
ec_slave_t
*
slave
,
/**< EtherCAT slave */
const
ec_
sii_
sync_t
*
sync
,
/**< sync manager */
const
ec_sync_t
*
sync
,
/**< sync manager */
uint8_t
*
data
/**> configuration memory */
)
{
...
...
This diff is collapsed.
Click to expand it.
master/slave.h
+
14
−
9
View file @
c4fe3fba
...
...
@@ -72,6 +72,11 @@ typedef enum
}
ec_slave_state_t
;
/*****************************************************************************/
/**
*/
typedef
enum
{
EC_SLAVE_OFFLINE
,
EC_SLAVE_ONLINE
...
...
@@ -97,7 +102,7 @@ enum
/*****************************************************************************/
/**
Sync manager
configuration (EEPROM)
.
Sync manager.
*/
typedef
struct
...
...
@@ -107,11 +112,12 @@ typedef struct
uint16_t
length
;
/**< data length in bytes */
uint8_t
control_register
;
/**< control register value */
uint8_t
enable
;
/**< enable bit */
uint16_t
est_length
;
/**< Estimated length. This is no field of the SII,
but it is used to calculate the length via
PDO ranges */
}
ec_
sii_
sync_t
;
ec_sync_t
;
/*****************************************************************************/
...
...
@@ -169,7 +175,7 @@ typedef struct
{
unsigned
int
index
;
/**< FMMU index */
const
ec_domain_t
*
domain
;
/**< domain */
const
ec_
sii_
sync_t
*
sync
;
/**< sync manager */
const
ec_sync_t
*
sync
;
/**< sync manager */
uint32_t
logical_start_address
;
/**< logical start address */
}
ec_fmmu_t
;
...
...
@@ -228,7 +234,7 @@ struct ec_slave
uint8_t
sii_physical_layer
[
4
];
/**< port media */
char
**
sii_strings
;
/**< strings in EEPROM categories */
unsigned
int
sii_string_count
;
/**< number of EEPROM strings */
ec_
sii_
sync_t
*
sii_syncs
;
/**< EEPROM SYNC MANAGER categories */
ec_sync_t
*
sii_syncs
;
/**< EEPROM SYNC MANAGER categories */
unsigned
int
sii_sync_count
;
/**< number of sync managers in EEPROM */
struct
list_head
sii_pdos
;
/**< EEPROM [RT]XPDO categories */
char
*
sii_group
;
/**< slave group acc. to EEPROM */
...
...
@@ -256,7 +262,7 @@ void ec_slave_destroy(ec_slave_t *);
void
ec_slave_reset
(
ec_slave_t
*
);
int
ec_slave_prepare_fmmu
(
ec_slave_t
*
,
const
ec_domain_t
*
,
const
ec_
sii_
sync_t
*
);
const
ec_sync_t
*
);
void
ec_slave_request_state
(
ec_slave_t
*
,
ec_slave_state_t
);
void
ec_slave_set_state
(
ec_slave_t
*
,
ec_slave_state_t
);
...
...
@@ -270,11 +276,10 @@ int ec_slave_fetch_sii_pdos(ec_slave_t *, const uint8_t *, size_t,
ec_pdo_type_t
);
// misc.
ec_sii_sync_t
*
ec_slave_get_pdo_sync
(
ec_slave_t
*
,
ec_direction_t
);
void
ec_slave_sync_config
(
const
ec_slave_t
*
,
const
ec_sii_sync_t
*
,
uint8_t
*
);
ec_sync_t
*
ec_slave_get_pdo_sync
(
ec_slave_t
*
,
ec_direction_t
);
void
ec_slave_sync_config
(
const
ec_slave_t
*
,
const
ec_sync_t
*
,
uint8_t
*
);
void
ec_slave_fmmu_config
(
const
ec_slave_t
*
,
const
ec_fmmu_t
*
,
uint8_t
*
);
uint16_t
ec_slave_calc_sync_size
(
const
ec_slave_t
*
,
const
ec_
sii_
sync_t
*
);
uint16_t
ec_slave_calc_sync_size
(
const
ec_slave_t
*
,
const
ec_sync_t
*
);
int
ec_slave_is_coupler
(
const
ec_slave_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