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
2dd52764
Commit
2dd52764
authored
18 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
Smaller fixes on RTAI example.
parent
0a8af0f0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/rtai/rtai_sample.c
+2
-10
2 additions, 10 deletions
examples/rtai/rtai_sample.c
with
2 additions
and
10 deletions
examples/rtai/rtai_sample.c
+
2
−
10
View file @
2dd52764
...
@@ -23,17 +23,14 @@
...
@@ -23,17 +23,14 @@
*
*
*****************************************************************************/
*****************************************************************************/
// Linux
#include
<linux/module.h>
#include
<linux/module.h>
#include
<linux/delay.h>
#include
<linux/timer.h>
#include
<linux/interrupt.h>
// RTAI
// RTAI
#include
"rtai.h"
#include
"rtai_sched.h"
#include
"rtai_sched.h"
#include
"rtai_sem.h"
#include
"rtai_sem.h"
// EtherCAT
realtime interface
// EtherCAT
#include
"../../include/ecrt.h"
#include
"../../include/ecrt.h"
/*****************************************************************************/
/*****************************************************************************/
...
@@ -63,7 +60,6 @@ void *r_ssi_input;
...
@@ -63,7 +60,6 @@ void *r_ssi_input;
// channels
// channels
uint32_t
k_pos
;
uint32_t
k_pos
;
uint8_t
k_stat
;
ec_field_init_t
domain1_fields
[]
=
{
ec_field_init_t
domain1_fields
[]
=
{
{
&
r_ssi_input
,
"3"
,
"Beckhoff"
,
"EL5001"
,
"InputValue"
,
0
},
{
&
r_ssi_input
,
"3"
,
"Beckhoff"
,
"EL5001"
,
"InputValue"
,
0
},
...
@@ -207,12 +203,10 @@ int __init init_mod(void)
...
@@ -207,12 +203,10 @@ int __init init_mod(void)
ecrt_master_prepare_async_io
(
master
);
ecrt_master_prepare_async_io
(
master
);
#endif
#endif
#if 1
if
(
ecrt_master_start_eoe
(
master
))
{
if
(
ecrt_master_start_eoe
(
master
))
{
printk
(
KERN_ERR
"Failed to start EoE processing!
\n
"
);
printk
(
KERN_ERR
"Failed to start EoE processing!
\n
"
);
goto
out_deactivate
;
goto
out_deactivate
;
}
}
#endif
printk
(
"Starting cyclic sample thread...
\n
"
);
printk
(
"Starting cyclic sample thread...
\n
"
);
requested_ticks
=
nano2count
(
TIMERTICKS
);
requested_ticks
=
nano2count
(
TIMERTICKS
);
...
@@ -253,10 +247,8 @@ void __exit cleanup_mod(void)
...
@@ -253,10 +247,8 @@ void __exit cleanup_mod(void)
{
{
printk
(
KERN_INFO
"=== Stopping EtherCAT RTAI sample module... ===
\n
"
);
printk
(
KERN_INFO
"=== Stopping EtherCAT RTAI sample module... ===
\n
"
);
printk
(
KERN_INFO
"Stopping RT task...
\n
"
);
rt_task_delete
(
&
task
);
rt_task_delete
(
&
task
);
stop_rt_timer
();
stop_rt_timer
();
printk
(
KERN_INFO
"Deactivating EtherCAT master...
\n
"
);
ecrt_master_deactivate
(
master
);
ecrt_master_deactivate
(
master
);
ecrt_release_master
(
master
);
ecrt_release_master
(
master
);
rt_sem_delete
(
&
master_sem
);
rt_sem_delete
(
&
master_sem
);
...
...
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