Fixed mail address; limited lines to 78 characters; removed $Id$.

This commit is contained in:
Florian Pose
2024-02-01 15:15:41 +01:00
parent 512bac72e2
commit ee55c20e28
283 changed files with 2137 additions and 2647 deletions

View File

@@ -1,6 +1,4 @@
#------------------------------------------------------------------------------
#
# $Id$
#-----------------------------------------------------------------------------
#
# Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
#
@@ -23,7 +21,7 @@
#
# vi: syntax=make
#
#------------------------------------------------------------------------------
#-----------------------------------------------------------------------------
src := @abs_srcdir@
ccflags-y := -I@abs_top_builddir@
@@ -40,4 +38,4 @@ KBUILD_EXTRA_SYMBOLS := \
@abs_top_builddir@/$(LINUX_SYMVERS) \
@abs_top_builddir@/master/$(LINUX_SYMVERS)
#------------------------------------------------------------------------------
#-----------------------------------------------------------------------------

View File

@@ -1,10 +1,4 @@
#------------------------------------------------------------------------------
#
# Makefile.am
#
# IgH EtherCAT master module
#
# $Id$
#-----------------------------------------------------------------------------
#
# Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
#
@@ -23,7 +17,8 @@
# with the IgH EtherCAT Master; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
#------------------------------------------------------------------------------
#-----------------------------------------------------------------------------
include $(top_srcdir)/Makefile.kbuild
noinst_HEADERS = \
@@ -31,4 +26,4 @@ noinst_HEADERS = \
serial.h \
tty.c
#------------------------------------------------------------------------------
#-----------------------------------------------------------------------------

View File

@@ -1,6 +1,4 @@
/******************************************************************************
*
* $Id$
/*****************************************************************************
*
* Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
*
@@ -19,7 +17,7 @@
* with the IgH EtherCAT Master; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*****************************************************************************/
****************************************************************************/
#include <linux/module.h>
#include <linux/err.h>
@@ -29,14 +27,14 @@
#include "../../include/ecrt.h" // EtherCAT realtime interface
#include "../../include/ectty.h" // EtherCAT TTY interface
/*****************************************************************************/
/****************************************************************************/
// Optional features
#define PFX "ec_tty_example: "
#define DEBUG 0
/*****************************************************************************/
/****************************************************************************/
#define VendorIdBeckhoff 0x00000002
#define ProductCodeBeckhoffEL6002 0x17723052
@@ -44,7 +42,7 @@
#define VendorIdIds 0x000012ad
#define ProductCodeIdsCSI71A 0x17723052
/*****************************************************************************/
/****************************************************************************/
typedef enum {
SER_REQUEST_INIT,
@@ -108,7 +106,7 @@ typedef struct {
LIST_HEAD(handlers);
/*****************************************************************************/
/****************************************************************************/
/* Beckhoff EL6002
* Vendor ID: 0x00000002
@@ -546,7 +544,8 @@ void el60xx_port_run(el60xx_port_t *port, u8 *pd)
tx_accepted_toggle = status & 0x0001;
if (tx_accepted_toggle != port->tx_accepted_toggle) { // ready
port->tx_data_size =
ectty_tx_data(port->tty, port->tx_data, port->max_tx_data_size);
ectty_tx_data(port->tty, port->tx_data,
port->max_tx_data_size);
if (port->tx_data_size) {
#if DEBUG
printk(KERN_INFO PFX "%s: Sending %u bytes.\n",
@@ -723,7 +722,7 @@ void el6002_run(el6002_t *el6002, u8 *pd)
}
}
/*****************************************************************************/
/****************************************************************************/
void run_serial_devices(u8 *pd)
{
@@ -734,7 +733,7 @@ void run_serial_devices(u8 *pd)
}
}
/*****************************************************************************/
/****************************************************************************/
int create_el6002_handler(ec_master_t *master, ec_domain_t *domain,
u16 position, u32 vendor, u32 product)
@@ -761,7 +760,7 @@ int create_el6002_handler(ec_master_t *master, ec_domain_t *domain,
return 0;
}
/*****************************************************************************/
/****************************************************************************/
int create_serial_devices(ec_master_t *master, ec_domain_t *domain)
{
@@ -815,7 +814,7 @@ out_return:
return ret;
}
/*****************************************************************************/
/****************************************************************************/
void free_serial_devices(void)
{
@@ -832,4 +831,4 @@ void free_serial_devices(void)
printk(KERN_INFO PFX "Finished cleaning up serial devices.\n");
}
/*****************************************************************************/
/****************************************************************************/

View File

@@ -1,6 +1,4 @@
/******************************************************************************
*
* $Id$
/*****************************************************************************
*
* Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
*
@@ -19,11 +17,11 @@
* with the IgH EtherCAT Master; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*****************************************************************************/
****************************************************************************/
int create_serial_devices(ec_master_t *, ec_domain_t *);
void free_serial_devices(void);
void run_serial_devices(u8 *);
/*****************************************************************************/
/****************************************************************************/

View File

@@ -1,6 +1,4 @@
/******************************************************************************
*
* $Id$
/*****************************************************************************
*
* Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
*
@@ -19,7 +17,7 @@
* with the IgH EtherCAT Master; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*****************************************************************************/
****************************************************************************/
#include <linux/version.h>
#include <linux/module.h>
@@ -32,7 +30,7 @@
#include "serial.h"
/*****************************************************************************/
/****************************************************************************/
// Module parameters
#define FREQUENCY 100
@@ -41,7 +39,7 @@
#define PFX "ec_tty_example: "
/*****************************************************************************/
/****************************************************************************/
// EtherCAT
static ec_master_t *master = NULL;
@@ -54,7 +52,7 @@ static ec_domain_state_t domain1_state = {};
// Timer
static struct timer_list timer;
/*****************************************************************************/
/****************************************************************************/
// process data
static uint8_t *domain1_pd; // process data memory
@@ -65,7 +63,7 @@ static uint8_t *domain1_pd; // process data memory
static unsigned int counter = 0;
/*****************************************************************************/
/****************************************************************************/
void check_domain1_state(void)
{
@@ -83,7 +81,7 @@ void check_domain1_state(void)
domain1_state = ds;
}
/*****************************************************************************/
/****************************************************************************/
void check_master_state(void)
{
@@ -103,7 +101,7 @@ void check_master_state(void)
master_state = ms;
}
/*****************************************************************************/
/****************************************************************************/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
void cyclic_task(struct timer_list *t)
@@ -142,7 +140,7 @@ void cyclic_task(unsigned long data)
add_timer(&timer);
}
/*****************************************************************************/
/****************************************************************************/
void send_callback(void *cb_data)
{
@@ -152,7 +150,7 @@ void send_callback(void *cb_data)
up(&master_sem);
}
/*****************************************************************************/
/****************************************************************************/
void receive_callback(void *cb_data)
{
@@ -162,7 +160,7 @@ void receive_callback(void *cb_data)
up(&master_sem);
}
/*****************************************************************************/
/****************************************************************************/
int __init init_mini_module(void)
{
@@ -229,7 +227,7 @@ out_return:
return ret;
}
/*****************************************************************************/
/****************************************************************************/
void __exit cleanup_mini_module(void)
{
@@ -245,13 +243,13 @@ void __exit cleanup_mini_module(void)
printk(KERN_INFO PFX "Unloading.\n");
}
/*****************************************************************************/
/****************************************************************************/
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Florian Pose <fp@igh-essen.com>");
MODULE_AUTHOR("Florian Pose <fp@igh.de>");
MODULE_DESCRIPTION("EtherCAT minimal test environment");
module_init(init_mini_module);
module_exit(cleanup_mini_module);
/*****************************************************************************/
/****************************************************************************/