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
accbd1ee
Commit
accbd1ee
authored
18 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
Added some documentation.
parent
89ab49c1
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
examples/rtai/rtai_sample.c
+6
-4
6 additions, 4 deletions
examples/rtai/rtai_sample.c
master/fsm.c
+4
-0
4 additions, 0 deletions
master/fsm.c
master/globals.h
+53
-1
53 additions, 1 deletion
master/globals.h
master/master.c
+0
-1
0 additions, 1 deletion
master/master.c
with
63 additions
and
6 deletions
examples/rtai/rtai_sample.c
+
6
−
4
View file @
accbd1ee
...
...
@@ -45,6 +45,12 @@
/*****************************************************************************/
MODULE_LICENSE
(
"GPL"
);
MODULE_AUTHOR
(
"Florian Pose <fp@igh-essen.com>"
);
MODULE_DESCRIPTION
(
"EtherCAT RTAI sample module"
);
/*****************************************************************************/
// comment this for synchronous IO
#define ASYNC
...
...
@@ -268,10 +274,6 @@ void __exit cleanup_mod(void)
/*****************************************************************************/
MODULE_LICENSE
(
"GPL"
);
MODULE_AUTHOR
(
"Florian Pose <fp@igh-essen.com>"
);
MODULE_DESCRIPTION
(
"EtherCAT RTAI sample module"
);
module_init
(
init_mod
);
module_exit
(
cleanup_mod
);
...
...
This diff is collapsed.
Click to expand it.
master/fsm.c
+
4
−
0
View file @
accbd1ee
...
...
@@ -44,6 +44,10 @@
/*****************************************************************************/
/**
Size of memory to allocate while reading categories.
*/
#define EC_CAT_MEM 0x100
/*****************************************************************************/
...
...
This diff is collapsed.
Click to expand it.
master/globals.h
+
53
−
1
View file @
accbd1ee
...
...
@@ -90,20 +90,65 @@
/*****************************************************************************/
/**
Convenience macro for printing EtherCAT-specific information to syslog.
This will print the message in \a fmt with a prefixed "EtherCAT: ".
\param fmt format string (like in printf())
\param args arguments (optional)
*/
#define EC_INFO(fmt, args...) \
printk(KERN_INFO "EtherCAT: " fmt, ##args)
/**
Convenience macro for printing EtherCAT-specific errors to syslog.
This will print the message in \a fmt with a prefixed "EtherCAT ERROR: ".
\param fmt format string (like in printf())
\param args arguments (optional)
*/
#define EC_ERR(fmt, args...) \
printk(KERN_ERR "EtherCAT ERROR: " fmt, ##args)
/**
Convenience macro for printing EtherCAT-specific warnings to syslog.
This will print the message in \a fmt with a prefixed "EtherCAT WARNING: ".
\param fmt format string (like in printf())
\param args arguments (optional)
*/
#define EC_WARN(fmt, args...) \
printk(KERN_WARNING "EtherCAT WARNING: " fmt, ##args)
/**
Convenience macro for printing EtherCAT debug messages to syslog.
This will print the message in \a fmt with a prefixed "EtherCAT DEBUG: ".
\param fmt format string (like in printf())
\param args arguments (optional)
*/
#define EC_DBG(fmt, args...) \
printk(KERN_DEBUG "EtherCAT DEBUG: " fmt, ##args)
/**
Helper macro for EC_STR(), literates a macro argument.
\param X argument to literate.
*/
#define EC_LIT(X) #X
/**
Converts a macro argument to a string.
\param X argument to stringify.
*/
#define EC_STR(X) EC_LIT(X)
/**
Convenience macro for defining SysFS attributes.
Convenience macro for defining read-only SysFS attributes.
This results in creating a static variable called attr_\a NAME. The SysFS
file will be world-readable.
\param NAME name of the attribute to create.
*/
#define EC_SYSFS_READ_ATTR(NAME) \
...
...
@@ -111,6 +156,13 @@
.name = EC_STR(NAME), .owner = THIS_MODULE, .mode = S_IRUGO \
}
/**
Convenience macro for defining read-write SysFS attributes.
This results in creating a static variable called attr_\a NAME. The SysFS
file will be word-readable plus owner-writable.
\param NAME name of the attribute to create.
*/
#define EC_SYSFS_READ_WRITE_ATTR(NAME) \
static struct attribute attr_##NAME = { \
.name = EC_STR(NAME), .owner = THIS_MODULE, .mode = S_IRUGO | S_IWUSR \
...
...
This diff is collapsed.
Click to expand it.
master/master.c
+
0
−
1
View file @
accbd1ee
...
...
@@ -58,7 +58,6 @@
void
ec_master_freerun
(
void
*
);
void
ec_master_eoe_run
(
unsigned
long
);
ssize_t
ec_show_master_attribute
(
struct
kobject
*
,
struct
attribute
*
,
char
*
);
void
ec_master_process_watch_command
(
ec_master_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