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
86887d22
Commit
86887d22
authored
18 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
Minor changes to minimal example.
parent
240cbbf5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/mini/mini.c
+6
-2
6 additions, 2 deletions
examples/mini/mini.c
with
6 additions
and
2 deletions
examples/mini/mini.c
+
6
−
2
View file @
86887d22
...
...
@@ -42,6 +42,8 @@
#define FREQUENCY 100
//#define KBUS
/*****************************************************************************/
struct
timer_list
timer
;
...
...
@@ -52,7 +54,7 @@ ec_domain_t *domain1 = NULL;
spinlock_t
master_lock
=
SPIN_LOCK_UNLOCKED
;
// data fields
#if
1
#if
def KBUS
void
*
r_inputs
;
void
*
r_outputs
;
#endif
...
...
@@ -81,7 +83,9 @@ void run(unsigned long data)
// process data
//k_pos = EC_READ_U32(r_ssi);
#ifdef KBUS
EC_WRITE_U8
(
r_outputs
+
2
,
einaus
?
0xFF
:
0x00
);
#endif
// send
ecrt_master_run
(
master
);
...
...
@@ -149,7 +153,7 @@ int __init init_mini_module(void)
}
#endif
#if
1
#if
def KBUS
if
(
!
ecrt_domain_register_pdo_range
(
domain1
,
"0"
,
Beckhoff_BK1120
,
EC_DIR_OUTPUT
,
0
,
4
,
&
r_outputs
))
{
printk
(
KERN_ERR
"PDO registration failed!
\n
"
);
...
...
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