提交 0841a555 编写于 作者: G Greg Kroah-Hartman

Staging: remove epl driver

This is no longer maintained upstream, and no one cares about it at all,
so delete it.

The fact that it is duplicating an existing network driver also is a
good reason to remove it, it's causing nothing but trouble right now.

Cc: Daniel Krueger <daniel.krueger@systec-electronic.com>
Cc: Ronald Sieber <Ronald.Sieber@systec-electronic.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 51be9796
......@@ -95,8 +95,6 @@ source "drivers/staging/mimio/Kconfig"
source "drivers/staging/frontier/Kconfig"
source "drivers/staging/epl/Kconfig"
source "drivers/staging/android/Kconfig"
source "drivers/staging/dream/Kconfig"
......
......@@ -30,7 +30,6 @@ obj-$(CONFIG_RTL8192SU) += rtl8192su/
obj-$(CONFIG_USB_RSPI) += rspiusb/
obj-$(CONFIG_INPUT_MIMIO) += mimio/
obj-$(CONFIG_TRANZPORT) += frontier/
obj-$(CONFIG_EPL) += epl/
obj-$(CONFIG_ANDROID) += android/
obj-$(CONFIG_ANDROID) += dream/
obj-$(CONFIG_DST) += dst/
......
/****************************************************************************
(c) SYSTEC electronic GmbH, D-07973 Greiz, August-Bebel-Str. 29
www.systec-electronic.com
Project: openPOWERLINK
Description: header file for benchmarking
License:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of SYSTEC electronic GmbH nor the names of its
contributors may be used to endorse or promote products derived
from this software without prior written permission. For written
permission, please contact info@systec-electronic.com.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Severability Clause:
If a provision of this License is or becomes illegal, invalid or
unenforceable in any jurisdiction, that shall not affect:
1. the validity or enforceability in that jurisdiction of any other
provision of this License; or
2. the validity or enforceability in other jurisdictions of that or
any other provision of this License.
-------------------------------------------------------------------------
$RCSfile: Benchmark.h,v $
$Author: D.Krueger $
$Revision: 1.5 $ $Date: 2008/04/17 21:36:32 $
$State: Exp $
Build Environment:
...
-------------------------------------------------------------------------
Revision History:
2006/08/16 d.k.: start of implementation
****************************************************************************/
#ifndef _BENCHMARK_H_
#define _BENCHMARK_H_
#include "global.h"
#include <linux/kernel.h>
#ifdef CONFIG_COLDFIRE
#include <asm/coldfire.h>
#include <asm/m5485gpio.h>
#define BENCHMARK_SET(x) MCF_GPIO_PODR_PCIBG |= (1 << (x)) // (x+1)
#define BENCHMARK_RESET(x) MCF_GPIO_PODR_PCIBG &= ~(1 << (x)) // (x+1)
#define BENCHMARK_TOGGLE(x) MCF_GPIO_PODR_PCIBR ^= (1 << (x - 5))
#else
#undef BENCHMARK_MODULES
#define BENCHMARK_MODULES 0x00000000
#endif
/***************************************************************************/
/* */
/* */
/* G L O B A L D E F I N I T I O N S */
/* */
/* */
/***************************************************************************/
//---------------------------------------------------------------------------
// const defines
//---------------------------------------------------------------------------
#ifndef BENCHMARK_MODULES
#define BENCHMARK_MODULES 0x00000000
#endif
#define BENCHMARK_MOD_01 0x00000001
#define BENCHMARK_MOD_02 0x00000002
#define BENCHMARK_MOD_03 0x00000004
#define BENCHMARK_MOD_04 0x00000008
#define BENCHMARK_MOD_05 0x00000010
#define BENCHMARK_MOD_06 0x00000020
#define BENCHMARK_MOD_07 0x00000040
#define BENCHMARK_MOD_08 0x00000080
#define BENCHMARK_MOD_09 0x00000100
#define BENCHMARK_MOD_10 0x00000200
#define BENCHMARK_MOD_11 0x00000400
#define BENCHMARK_MOD_12 0x00000800
#define BENCHMARK_MOD_13 0x00001000
#define BENCHMARK_MOD_14 0x00002000
#define BENCHMARK_MOD_15 0x00004000
#define BENCHMARK_MOD_16 0x00008000
#define BENCHMARK_MOD_17 0x00010000
#define BENCHMARK_MOD_18 0x00020000
#define BENCHMARK_MOD_19 0x00040000
#define BENCHMARK_MOD_20 0x00080000
#define BENCHMARK_MOD_21 0x00100000
#define BENCHMARK_MOD_22 0x00200000
#define BENCHMARK_MOD_23 0x00400000
#define BENCHMARK_MOD_24 0x00800000
#define BENCHMARK_MOD_25 0x01000000
#define BENCHMARK_MOD_26 0x02000000
#define BENCHMARK_MOD_27 0x04000000
#define BENCHMARK_MOD_28 0x08000000
#define BENCHMARK_MOD_29 0x10000000
#define BENCHMARK_MOD_30 0x20000000
#define BENCHMARK_MOD_31 0x40000000
#define BENCHMARK_MOD_32 0x80000000
#if (BENCHMARK_MODULES & BENCHMARK_MOD_01)
#define BENCHMARK_MOD_01_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_01_RESET(x) BENCHMARK_RESET(x)
#define BENCHMARK_MOD_01_TOGGLE(x) BENCHMARK_TOGGLE(x)
#else
#define BENCHMARK_MOD_01_SET(x)
#define BENCHMARK_MOD_01_RESET(x)
#define BENCHMARK_MOD_01_TOGGLE(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_02)
#define BENCHMARK_MOD_02_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_02_RESET(x) BENCHMARK_RESET(x)
#define BENCHMARK_MOD_02_TOGGLE(x) BENCHMARK_TOGGLE(x)
#else
#define BENCHMARK_MOD_02_SET(x)
#define BENCHMARK_MOD_02_RESET(x)
#define BENCHMARK_MOD_02_TOGGLE(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_03)
#define BENCHMARK_MOD_03_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_03_RESET(x) BENCHMARK_RESET(x)
#define BENCHMARK_MOD_03_TOGGLE(x) BENCHMARK_TOGGLE(x)
#else
#define BENCHMARK_MOD_03_SET(x)
#define BENCHMARK_MOD_03_RESET(x)
#define BENCHMARK_MOD_03_TOGGLE(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_04)
#define BENCHMARK_MOD_04_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_04_RESET(x) BENCHMARK_RESET(x)
#define BENCHMARK_MOD_04_TOGGLE(x) BENCHMARK_TOGGLE(x)
#else
#define BENCHMARK_MOD_04_SET(x)
#define BENCHMARK_MOD_04_RESET(x)
#define BENCHMARK_MOD_04_TOGGLE(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_05)
#define BENCHMARK_MOD_05_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_05_RESET(x) BENCHMARK_RESET(x)
#define BENCHMARK_MOD_05_TOGGLE(x) BENCHMARK_TOGGLE(x)
#else
#define BENCHMARK_MOD_05_SET(x)
#define BENCHMARK_MOD_05_RESET(x)
#define BENCHMARK_MOD_05_TOGGLE(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_06)
#define BENCHMARK_MOD_06_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_06_RESET(x) BENCHMARK_RESET(x)
#define BENCHMARK_MOD_06_TOGGLE(x) BENCHMARK_TOGGLE(x)
#else
#define BENCHMARK_MOD_06_SET(x)
#define BENCHMARK_MOD_06_RESET(x)
#define BENCHMARK_MOD_06_TOGGLE(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_07)
#define BENCHMARK_MOD_07_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_07_RESET(x) BENCHMARK_RESET(x)
#define BENCHMARK_MOD_07_TOGGLE(x) BENCHMARK_TOGGLE(x)
#else
#define BENCHMARK_MOD_07_SET(x)
#define BENCHMARK_MOD_07_RESET(x)
#define BENCHMARK_MOD_07_TOGGLE(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_08)
#define BENCHMARK_MOD_08_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_08_RESET(x) BENCHMARK_RESET(x)
#define BENCHMARK_MOD_08_TOGGLE(x) BENCHMARK_TOGGLE(x)
#else
#define BENCHMARK_MOD_08_SET(x)
#define BENCHMARK_MOD_08_RESET(x)
#define BENCHMARK_MOD_08_TOGGLE(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_09)
#define BENCHMARK_MOD_09_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_09_RESET(x) BENCHMARK_RESET(x)
#define BENCHMARK_MOD_09_TOGGLE(x) BENCHMARK_TOGGLE(x)
#else
#define BENCHMARK_MOD_09_SET(x)
#define BENCHMARK_MOD_09_RESET(x)
#define BENCHMARK_MOD_09_TOGGLE(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_10)
#define BENCHMARK_MOD_10_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_10_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_10_SET(x)
#define BENCHMARK_MOD_10_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_11)
#define BENCHMARK_MOD_11_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_11_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_11_SET(x)
#define BENCHMARK_MOD_11_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_12)
#define BENCHMARK_MOD_12_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_12_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_12_SET(x)
#define BENCHMARK_MOD_12_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_13)
#define BENCHMARK_MOD_13_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_13_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_13_SET(x)
#define BENCHMARK_MOD_13_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_14)
#define BENCHMARK_MOD_14_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_14_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_14_SET(x)
#define BENCHMARK_MOD_14_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_15)
#define BENCHMARK_MOD_15_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_15_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_15_SET(x)
#define BENCHMARK_MOD_15_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_16)
#define BENCHMARK_MOD_16_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_16_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_16_SET(x)
#define BENCHMARK_MOD_16_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_17)
#define BENCHMARK_MOD_17_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_17_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_17_SET(x)
#define BENCHMARK_MOD_17_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_18)
#define BENCHMARK_MOD_18_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_18_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_18_SET(x)
#define BENCHMARK_MOD_18_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_19)
#define BENCHMARK_MOD_19_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_19_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_19_SET(x)
#define BENCHMARK_MOD_19_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_20)
#define BENCHMARK_MOD_20_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_20_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_20_SET(x)
#define BENCHMARK_MOD_20_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_21)
#define BENCHMARK_MOD_21_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_21_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_21_SET(x)
#define BENCHMARK_MOD_21_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_22)
#define BENCHMARK_MOD_22_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_22_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_22_SET(x)
#define BENCHMARK_MOD_22_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_23)
#define BENCHMARK_MOD_23_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_23_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_23_SET(x)
#define BENCHMARK_MOD_23_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_24)
#define BENCHMARK_MOD_24_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_24_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_24_SET(x)
#define BENCHMARK_MOD_24_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_25)
#define BENCHMARK_MOD_25_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_25_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_25_SET(x)
#define BENCHMARK_MOD_25_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_26)
#define BENCHMARK_MOD_26_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_26_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_26_SET(x)
#define BENCHMARK_MOD_26_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_27)
#define BENCHMARK_MOD_27_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_27_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_27_SET(x)
#define BENCHMARK_MOD_27_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_28)
#define BENCHMARK_MOD_28_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_28_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_28_SET(x)
#define BENCHMARK_MOD_28_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_29)
#define BENCHMARK_MOD_29_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_29_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_29_SET(x)
#define BENCHMARK_MOD_29_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_30)
#define BENCHMARK_MOD_30_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_30_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_30_SET(x)
#define BENCHMARK_MOD_30_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_31)
#define BENCHMARK_MOD_31_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_31_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_31_SET(x)
#define BENCHMARK_MOD_31_RESET(x)
#endif
#if (BENCHMARK_MODULES & BENCHMARK_MOD_32)
#define BENCHMARK_MOD_32_SET(x) BENCHMARK_SET(x)
#define BENCHMARK_MOD_32_RESET(x) BENCHMARK_RESET(x)
#else
#define BENCHMARK_MOD_32_SET(x)
#define BENCHMARK_MOD_32_RESET(x)
#endif
//---------------------------------------------------------------------------
// modul global types
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// local vars
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// local function prototypes
//---------------------------------------------------------------------------
#endif // _BENCHMARK_H_
此差异已折叠。
此差异已折叠。
/****************************************************************************
(c) SYSTEC electronic GmbH, D-07973 Greiz, August-Bebel-Str. 29
www.systec-electronic.com
Project: openPOWERLINK
Description: interface for ethernetdriver
"fast ethernet controller" (FEC)
freescale coldfire MCF528x and compatible FEC
License:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of SYSTEC electronic GmbH nor the names of its
contributors may be used to endorse or promote products derived
from this software without prior written permission. For written
permission, please contact info@systec-electronic.com.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Severability Clause:
If a provision of this License is or becomes illegal, invalid or
unenforceable in any jurisdiction, that shall not affect:
1. the validity or enforceability in that jurisdiction of any other
provision of this License; or
2. the validity or enforceability in other jurisdictions of that or
any other provision of this License.
-------------------------------------------------------------------------
$RCSfile: EdrvFec.h,v $
$Author: D.Krueger $
$Revision: 1.3 $ $Date: 2008/04/17 21:36:32 $
$State: Exp $
Build Environment:
Dev C++ and GNU-Compiler for m68k
-------------------------------------------------------------------------
Revision History:
2005/08/01 m.b.: start of implementation
****************************************************************************/
#ifndef _EDRVFEC_H_
#define _EDRVFEC_H_
//---------------------------------------------------------------------------
// const defines
//---------------------------------------------------------------------------
// do this in config header
#define TARGET_HARDWARE TGTHW_SPLC_CF54
// base addresses
#if ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5282)
#elif ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5485)
#else
#error 'ERROR: Target was never implemented!'
#endif
//---------------------------------------------------------------------------
// types
//---------------------------------------------------------------------------
// Rx and Tx buffer descriptor format
typedef struct {
u16 m_wStatus; // control / status --- used by edrv, do not change in application
u16 m_wLength; // transfer length
u8 *m_pbData; // buffer address
} tBufferDescr;
#if ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5282)
#elif ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5485)
#endif
//---------------------------------------------------------------------------
// function prototypes
//---------------------------------------------------------------------------
#endif // #ifndef _EDRV_FEC_H_
/****************************************************************************
(c) SYSTEC electronic GmbH, D-07973 Greiz, August-Bebel-Str. 29
www.systec-electronic.com
Project: openPOWERLINK
Description: interface for ethernet driver simulation
License:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of SYSTEC electronic GmbH nor the names of its
contributors may be used to endorse or promote products derived
from this software without prior written permission. For written
permission, please contact info@systec-electronic.com.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Severability Clause:
If a provision of this License is or becomes illegal, invalid or
unenforceable in any jurisdiction, that shall not affect:
1. the validity or enforceability in that jurisdiction of any other
provision of this License; or
2. the validity or enforceability in other jurisdictions of that or
any other provision of this License.
-------------------------------------------------------------------------
$RCSfile: EdrvSim.h,v $
$Author: D.Krueger $
$Revision: 1.3 $ $Date: 2008/04/17 21:36:32 $
$State: Exp $
Build Environment:
Dev C++ and GNU-Compiler for m68k
-------------------------------------------------------------------------
Revision History:
2006/06/15 d.k.: start of implementation
****************************************************************************/
#ifndef _EDRVSIM_H_
#define _EDRVSIM_H_
//---------------------------------------------------------------------------
// const defines
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// types
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// function prototypes
//---------------------------------------------------------------------------
void EdrvRxInterruptHandler(u8 bBufferInFrame_p, u8 * pbEthernetData_p,
u16 wDataLen_p);
#endif // #ifndef _EDRVSIM_H_
/****************************************************************************
(c) SYSTEC electronic GmbH, D-07973 Greiz, August-Bebel-Str. 29
www.systec-electronic.com
Project: openPOWERLINK
Description: include file for EPL API layer
License:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of SYSTEC electronic GmbH nor the names of its
contributors may be used to endorse or promote products derived
from this software without prior written permission. For written
permission, please contact info@systec-electronic.com.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Severability Clause:
If a provision of this License is or becomes illegal, invalid or
unenforceable in any jurisdiction, that shall not affect:
1. the validity or enforceability in that jurisdiction of any other
provision of this License; or
2. the validity or enforceability in other jurisdictions of that or
any other provision of this License.
-------------------------------------------------------------------------
$RCSfile: Epl.h,v $
$Author: D.Krueger $
$Revision: 1.8 $ $Date: 2008/11/17 16:40:39 $
$State: Exp $
Build Environment:
GCC V3.4
-------------------------------------------------------------------------
Revision History:
2006/05/22 d.k.: start of the implementation, version 1.00
****************************************************************************/
#ifndef _EPL_API_H_
#define _EPL_API_H_
#include "EplInc.h"
#include "EplSdo.h"
#include "EplObd.h"
#include "EplLed.h"
#include "EplEvent.h"
//---------------------------------------------------------------------------
// const defines
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// typedef
//---------------------------------------------------------------------------
typedef struct {
unsigned int m_uiNodeId;
tEplNmtState m_NmtState;
tEplNmtNodeEvent m_NodeEvent;
u16 m_wErrorCode; // EPL error code if m_NodeEvent == kEplNmtNodeEventError
BOOL m_fMandatory;
} tEplApiEventNode;
typedef struct {
tEplNmtState m_NmtState; // local NMT state
tEplNmtBootEvent m_BootEvent;
u16 m_wErrorCode; // EPL error code if m_BootEvent == kEplNmtBootEventError
} tEplApiEventBoot;
typedef struct {
tEplLedType m_LedType; // type of the LED (e.g. Status or Error)
BOOL m_fOn; // state of the LED (e.g. on or off)
} tEplApiEventLed;
typedef enum {
kEplApiEventNmtStateChange = 0x10, // m_NmtStateChange
// kEplApiEventRequestNmt = 0x11, // m_bNmtCmd
kEplApiEventCriticalError = 0x12, // m_InternalError, Stack halted
kEplApiEventWarning = 0x13, // m_InternalError, Stack running
kEplApiEventNode = 0x20, // m_Node
kEplApiEventBoot = 0x21, // m_Boot
kEplApiEventSdo = 0x62, // m_Sdo
kEplApiEventObdAccess = 0x69, // m_ObdCbParam
kEplApiEventLed = 0x70, // m_Led
} tEplApiEventType;
typedef union {
tEplEventNmtStateChange m_NmtStateChange;
tEplEventError m_InternalError;
tEplSdoComFinished m_Sdo;
tEplObdCbParam m_ObdCbParam;
tEplApiEventNode m_Node;
tEplApiEventBoot m_Boot;
tEplApiEventLed m_Led;
} tEplApiEventArg;
typedef tEplKernel(*tEplApiCbEvent) (tEplApiEventType EventType_p, // IN: event type (enum)
tEplApiEventArg *pEventArg_p, // IN: event argument (union)
void *pUserArg_p);
typedef struct {
unsigned int m_uiSizeOfStruct;
BOOL m_fAsyncOnly; // do not need to register PRes
unsigned int m_uiNodeId; // local node ID
u8 m_abMacAddress[6]; // local MAC address
// 0x1F82: NMT_FeatureFlags_U32
u32 m_dwFeatureFlags;
// Cycle Length (0x1006: NMT_CycleLen_U32) in [us]
u32 m_dwCycleLen; // required for error detection
// 0x1F98: NMT_CycleTiming_REC
// 0x1F98.1: IsochrTxMaxPayload_U16
unsigned int m_uiIsochrTxMaxPayload; // const
// 0x1F98.2: IsochrRxMaxPayload_U16
unsigned int m_uiIsochrRxMaxPayload; // const
// 0x1F98.3: PResMaxLatency_U32
u32 m_dwPresMaxLatency; // const in [ns], only required for IdentRes
// 0x1F98.4: PReqActPayloadLimit_U16
unsigned int m_uiPreqActPayloadLimit; // required for initialisation (+28 bytes)
// 0x1F98.5: PResActPayloadLimit_U16
unsigned int m_uiPresActPayloadLimit; // required for initialisation of Pres frame (+28 bytes)
// 0x1F98.6: ASndMaxLatency_U32
u32 m_dwAsndMaxLatency; // const in [ns], only required for IdentRes
// 0x1F98.7: MultiplCycleCnt_U8
unsigned int m_uiMultiplCycleCnt; // required for error detection
// 0x1F98.8: AsyncMTU_U16
unsigned int m_uiAsyncMtu; // required to set up max frame size
// 0x1F98.9: Prescaler_U16
unsigned int m_uiPrescaler; // required for sync
// $$$ Multiplexed Slot
// 0x1C14: DLL_LossOfFrameTolerance_U32 in [ns]
u32 m_dwLossOfFrameTolerance;
// 0x1F8A: NMT_MNCycleTiming_REC
// 0x1F8A.1: WaitSoCPReq_U32 in [ns]
u32 m_dwWaitSocPreq;
// 0x1F8A.2: AsyncSlotTimeout_U32 in [ns]
u32 m_dwAsyncSlotTimeout;
u32 m_dwDeviceType; // NMT_DeviceType_U32
u32 m_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32
u32 m_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32
u32 m_dwRevisionNumber; // NMT_IdentityObject_REC.RevisionNo_U32
u32 m_dwSerialNumber; // NMT_IdentityObject_REC.SerialNo_U32
u64 m_qwVendorSpecificExt1;
u32 m_dwVerifyConfigurationDate; // CFM_VerifyConfiguration_REC.ConfDate_U32
u32 m_dwVerifyConfigurationTime; // CFM_VerifyConfiguration_REC.ConfTime_U32
u32 m_dwApplicationSwDate; // PDL_LocVerApplSw_REC.ApplSwDate_U32 on programmable device or date portion of NMT_ManufactSwVers_VS on non-programmable device
u32 m_dwApplicationSwTime; // PDL_LocVerApplSw_REC.ApplSwTime_U32 on programmable device or time portion of NMT_ManufactSwVers_VS on non-programmable device
u32 m_dwIpAddress;
u32 m_dwSubnetMask;
u32 m_dwDefaultGateway;
u8 m_sHostname[32];
u8 m_abVendorSpecificExt2[48];
char *m_pszDevName; // NMT_ManufactDevName_VS (0x1008/0 local OD)
char *m_pszHwVersion; // NMT_ManufactHwVers_VS (0x1009/0 local OD)
char *m_pszSwVersion; // NMT_ManufactSwVers_VS (0x100A/0 local OD)
tEplApiCbEvent m_pfnCbEvent;
void *m_pEventUserArg;
tEplSyncCb m_pfnCbSync;
} tEplApiInitParam;
typedef struct {
void *m_pImage;
unsigned int m_uiSize;
} tEplApiProcessImage;
//---------------------------------------------------------------------------
// function prototypes
//---------------------------------------------------------------------------
tEplKernel EplApiInitialize(tEplApiInitParam *pInitParam_p);
tEplKernel EplApiShutdown(void);
tEplKernel EplApiReadObject(tEplSdoComConHdl *pSdoComConHdl_p,
unsigned int uiNodeId_p,
unsigned int uiIndex_p,
unsigned int uiSubindex_p,
void *pDstData_le_p,
unsigned int *puiSize_p,
tEplSdoType SdoType_p, void *pUserArg_p);
tEplKernel EplApiWriteObject(tEplSdoComConHdl *pSdoComConHdl_p,
unsigned int uiNodeId_p,
unsigned int uiIndex_p,
unsigned int uiSubindex_p,
void *pSrcData_le_p,
unsigned int uiSize_p,
tEplSdoType SdoType_p, void *pUserArg_p);
tEplKernel EplApiFreeSdoChannel(tEplSdoComConHdl SdoComConHdl_p);
tEplKernel EplApiReadLocalObject(unsigned int uiIndex_p,
unsigned int uiSubindex_p,
void *pDstData_p,
unsigned int *puiSize_p);
tEplKernel EplApiWriteLocalObject(unsigned int uiIndex_p,
unsigned int uiSubindex_p,
void *pSrcData_p,
unsigned int uiSize_p);
tEplKernel EplApiCbObdAccess(tEplObdCbParam *pParam_p);
tEplKernel EplApiLinkObject(unsigned int uiObjIndex_p,
void *pVar_p,
unsigned int *puiVarEntries_p,
tEplObdSize *pEntrySize_p,
unsigned int uiFirstSubindex_p);
tEplKernel EplApiExecNmtCommand(tEplNmtEvent NmtEvent_p);
tEplKernel EplApiProcess(void);
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_NMT_MN)) != 0)
tEplKernel EplApiMnTriggerStateChange(unsigned int uiNodeId_p,
tEplNmtNodeCommand NodeCommand_p);
#endif
tEplKernel EplApiGetIdentResponse(unsigned int uiNodeId_p,
tEplIdentResponse **ppIdentResponse_p);
// functions for process image will be implemented in separate file
tEplKernel EplApiProcessImageSetup(void);
tEplKernel EplApiProcessImageExchangeIn(tEplApiProcessImage *pPI_p);
tEplKernel EplApiProcessImageExchangeOut(tEplApiProcessImage *pPI_p);
#endif // #ifndef _EPL_API_H_
/****************************************************************************
(c) SYSTEC electronic GmbH, D-07973 Greiz, August-Bebel-Str. 29
www.systec-electronic.com
Project: openPOWERLINK
Description: Definitions for Abstract Memory Interface
License:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of SYSTEC electronic GmbH nor the names of its
contributors may be used to endorse or promote products derived
from this software without prior written permission. For written
permission, please contact info@systec-electronic.com.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Severability Clause:
If a provision of this License is or becomes illegal, invalid or
unenforceable in any jurisdiction, that shall not affect:
1. the validity or enforceability in that jurisdiction of any other
provision of this License; or
2. the validity or enforceability in other jurisdictions of that or
any other provision of this License.
-------------------------------------------------------------------------
$RCSfile: EplAmi.h,v $
$Author: D.Krueger $
$Revision: 1.2 $ $Date: 2008/04/17 21:36:32 $
$State: Exp $
Build Environment:
GCC
-------------------------------------------------------------------------
Revision History:
06.03.2000 -rs
Implementation
16.09.2002 -as
To save code space the functions AmiSetByte and AmiGetByte
are replaced by macros. For targets which assign u8 by
an 16Bit type, the definition of macros must changed to
functions.
23.02.2005 r.d.:
Functions included for extended data types such as UNSIGNED24,
UNSIGNED40, ...
13.06.2006 d.k.:
Extended the interface for EPL with the different functions
for little endian and big endian
****************************************************************************/
#ifndef _EPLAMI_H_
#define _EPLAMI_H_
//---------------------------------------------------------------------------
// types
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// Prototypen
//---------------------------------------------------------------------------
#ifdef __cplusplus
extern "C" {
#endif
//---------------------------------------------------------------------------
//
// write functions
//
// To save code space the function AmiSetByte is replaced by
// an macro.
// void AmiSetByte (void * pAddr_p, u8 bByteVal_p);
#define AmiSetByteToBe(pAddr_p, bByteVal_p) {*(u8 *)(pAddr_p) = (bByteVal_p);}
#define AmiSetByteToLe(pAddr_p, bByteVal_p) {*(u8 *)(pAddr_p) = (bByteVal_p);}
void AmiSetWordToBe(void *pAddr_p, u16 wWordVal_p);
void AmiSetDwordToBe(void *pAddr_p, u32 dwDwordVal_p);
void AmiSetWordToLe(void *pAddr_p, u16 wWordVal_p);
void AmiSetDwordToLe(void *pAddr_p, u32 dwDwordVal_p);
//---------------------------------------------------------------------------
//
// read functions
//
// To save code space the function AmiGetByte is replaced by
// an macro.
// u8 AmiGetByte (void * pAddr_p);
#define AmiGetByteFromBe(pAddr_p) (*(u8 *)(pAddr_p))
#define AmiGetByteFromLe(pAddr_p) (*(u8 *)(pAddr_p))
u16 AmiGetWordFromBe(void *pAddr_p);
u32 AmiGetDwordFromBe(void *pAddr_p);
u16 AmiGetWordFromLe(void *pAddr_p);
u32 AmiGetDwordFromLe(void *pAddr_p);
//---------------------------------------------------------------------------
//
// Function: AmiSetDword24()
//
// Description: sets a 24 bit value to a buffer
//
// Parameters: pAddr_p = pointer to destination buffer
// dwDwordVal_p = value to set
//
// Return: void
//
//---------------------------------------------------------------------------
void AmiSetDword24ToBe(void *pAddr_p, u32 dwDwordVal_p);
void AmiSetDword24ToLe(void *pAddr_p, u32 dwDwordVal_p);
//---------------------------------------------------------------------------
//
// Function: AmiGetDword24()
//
// Description: reads a 24 bit value from a buffer
//
// Parameters: pAddr_p = pointer to source buffer
//
// Return: u32 = read value
//
//---------------------------------------------------------------------------
u32 AmiGetDword24FromBe(void *pAddr_p);
u32 AmiGetDword24FromLe(void *pAddr_p);
//#ifdef USE_VAR64
//---------------------------------------------------------------------------
//
// Function: AmiSetQword40()
//
// Description: sets a 40 bit value to a buffer
//
// Parameters: pAddr_p = pointer to destination buffer
// qwQwordVal_p = quadruple word value
//
// Return: void
//
//---------------------------------------------------------------------------
void AmiSetQword40ToBe(void *pAddr_p, u64 qwQwordVal_p);
void AmiSetQword40ToLe(void *pAddr_p, u64 qwQwordVal_p);
//---------------------------------------------------------------------------
//
// Function: AmiGetQword40()
//
// Description: reads a 40 bit value from a buffer
//
// Parameters: pAddr_p = pointer to source buffer
//
// Return: u64
//
//---------------------------------------------------------------------------
u64 AmiGetQword40FromBe(void *pAddr_p);
u64 AmiGetQword40FromLe(void *pAddr_p);
//---------------------------------------------------------------------------
//
// Function: AmiSetQword48()
//
// Description: sets a 48 bit value to a buffer
//
// Parameters: pAddr_p = pointer to destination buffer
// qwQwordVal_p = quadruple word value
//
// Return: void
//
//---------------------------------------------------------------------------
void AmiSetQword48ToBe(void *pAddr_p, u64 qwQwordVal_p);
void AmiSetQword48ToLe(void *pAddr_p, u64 qwQwordVal_p);
//---------------------------------------------------------------------------
//
// Function: AmiGetQword48()
//
// Description: reads a 48 bit value from a buffer
//
// Parameters: pAddr_p = pointer to source buffer
//
// Return: u64
//
//---------------------------------------------------------------------------
u64 AmiGetQword48FromBe(void *pAddr_p);
u64 AmiGetQword48FromLe(void *pAddr_p);
//---------------------------------------------------------------------------
//
// Function: AmiSetQword56()
//
// Description: sets a 56 bit value to a buffer
//
// Parameters: pAddr_p = pointer to destination buffer
// qwQwordVal_p = quadruple word value
//
// Return: void
//
//---------------------------------------------------------------------------
void AmiSetQword56ToBe(void *pAddr_p, u64 qwQwordVal_p);
void AmiSetQword56ToLe(void *pAddr_p, u64 qwQwordVal_p);
//---------------------------------------------------------------------------
//
// Function: AmiGetQword56()
//
// Description: reads a 56 bit value from a buffer
//
// Parameters: pAddr_p = pointer to source buffer
//
// Return: u64
//
//---------------------------------------------------------------------------
u64 AmiGetQword56FromBe(void *pAddr_p);
u64 AmiGetQword56FromLe(void *pAddr_p);
//---------------------------------------------------------------------------
//
// Function: AmiSetQword64()
//
// Description: sets a 64 bit value to a buffer
//
// Parameters: pAddr_p = pointer to destination buffer
// qwQwordVal_p = quadruple word value
//
// Return: void
//
//---------------------------------------------------------------------------
void AmiSetQword64ToBe(void *pAddr_p, u64 qwQwordVal_p);
void AmiSetQword64ToLe(void *pAddr_p, u64 qwQwordVal_p);
//---------------------------------------------------------------------------
//
// Function: AmiGetQword64()
//
// Description: reads a 64 bit value from a buffer
//
// Parameters: pAddr_p = pointer to source buffer
//
// Return: void
//
//---------------------------------------------------------------------------
u64 AmiGetQword64FromBe(void *pAddr_p);
u64 AmiGetQword64FromLe(void *pAddr_p);
//---------------------------------------------------------------------------
//
// Function: AmiSetTimeOfDay()
//
// Description: sets a TIME_OF_DAY (CANopen) value to a buffer
//
// Parameters: pAddr_p = pointer to destination buffer
// pTimeOfDay_p = pointer to struct TIME_OF_DAY
//
// Return: void
//
//---------------------------------------------------------------------------
void AmiSetTimeOfDay(void *pAddr_p, tTimeOfDay *pTimeOfDay_p);
//---------------------------------------------------------------------------
//
// Function: AmiGetTimeOfDay()
//
// Description: reads a TIME_OF_DAY (CANopen) value from a buffer
//
// Parameters: pAddr_p = pointer to source buffer
// pTimeOfDay_p = pointer to struct TIME_OF_DAY
//
// Return: void
//
//---------------------------------------------------------------------------
void AmiGetTimeOfDay(void *pAddr_p, tTimeOfDay *pTimeOfDay_p);
#ifdef __cplusplus
}
#endif
#endif // ifndef _EPLAMI_H_
// Die letzte Zeile muß unbedingt eine leere Zeile sein, weil manche Compiler// damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder).
此差异已折叠。
/****************************************************************************
(c) SYSTEC electronic GmbH, D-07973 Greiz, August-Bebel-Str. 29
www.systec-electronic.com
Project: openPOWERLINK
Description: include file for EPL API layer for Linux (kernel and user space)
License:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of SYSTEC electronic GmbH nor the names of its
contributors may be used to endorse or promote products derived
from this software without prior written permission. For written
permission, please contact info@systec-electronic.com.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Severability Clause:
If a provision of this License is or becomes illegal, invalid or
unenforceable in any jurisdiction, that shall not affect:
1. the validity or enforceability in that jurisdiction of any other
provision of this License; or
2. the validity or enforceability in other jurisdictions of that or
any other provision of this License.
-------------------------------------------------------------------------
$RCSfile: EplApiLinux.h,v $
$Author: D.Krueger $
$Revision: 1.5 $ $Date: 2008/08/25 12:17:41 $
$State: Exp $
Build Environment:
KEIL uVision 2
-------------------------------------------------------------------------
Revision History:
2006/10/11 d.k.: start of the implementation, version 1.00
****************************************************************************/
#ifndef _EPL_API_LINUX_H_
#define _EPL_API_LINUX_H_
//---------------------------------------------------------------------------
// const defines
//---------------------------------------------------------------------------
#define EPLLIN_DEV_NAME "epl" // used for "/dev" and "/proc" entry
//---------------------------------------------------------------------------
// Commands for <ioctl>
//---------------------------------------------------------------------------
#define EPLLIN_CMD_INITIALIZE 0 // ulArg_p ~ tEplApiInitParam*
#define EPLLIN_CMD_PI_IN 1 // ulArg_p ~ tEplApiProcessImage*
#define EPLLIN_CMD_PI_OUT 2 // ulArg_p ~ tEplApiProcessImage*
#define EPLLIN_CMD_WRITE_OBJECT 3 // ulArg_p ~ tEplLinSdoObject*
#define EPLLIN_CMD_READ_OBJECT 4 // ulArg_p ~ tEplLinSdoObject*
#define EPLLIN_CMD_WRITE_LOCAL_OBJECT 5 // ulArg_p ~ tEplLinLocalObject*
#define EPLLIN_CMD_READ_LOCAL_OBJECT 6 // ulArg_p ~ tEplLinLocalObject*
#define EPLLIN_CMD_FREE_SDO_CHANNEL 7 // ulArg_p ~ tEplSdoComConHdl
#define EPLLIN_CMD_NMT_COMMAND 8 // ulArg_p ~ tEplNmtEvent
#define EPLLIN_CMD_GET_EVENT 9 // ulArg_p ~ tEplLinEvent*
#define EPLLIN_CMD_MN_TRIGGER_STATE_CHANGE 10 // ulArg_p ~ tEplLinNodeCmdObject*
#define EPLLIN_CMD_PI_SETUP 11 // ulArg_p ~ 0
#define EPLLIN_CMD_SHUTDOWN 12 // ulArg_p ~ 0
//---------------------------------------------------------------------------
// typedef
//---------------------------------------------------------------------------
typedef struct {
unsigned int m_uiEventArgSize;
tEplApiEventArg *m_pEventArg;
tEplApiEventType *m_pEventType;
tEplKernel m_RetCbEvent;
} tEplLinEvent;
typedef struct {
tEplSdoComConHdl m_SdoComConHdl;
BOOL m_fValidSdoComConHdl;
unsigned int m_uiNodeId;
unsigned int m_uiIndex;
unsigned int m_uiSubindex;
void *m_le_pData;
unsigned int m_uiSize;
tEplSdoType m_SdoType;
void *m_pUserArg;
} tEplLinSdoObject;
typedef struct {
unsigned int m_uiIndex;
unsigned int m_uiSubindex;
void *m_pData;
unsigned int m_uiSize;
} tEplLinLocalObject;
typedef struct {
unsigned int m_uiNodeId;
tEplNmtNodeCommand m_NodeCommand;
} tEplLinNodeCmdObject;
//---------------------------------------------------------------------------
// function prototypes
//---------------------------------------------------------------------------
#endif // #ifndef _EPL_API_LINUX_H_
此差异已折叠。
/****************************************************************************
(c) SYSTEC electronic GmbH, D-07973 Greiz, August-Bebel-Str. 29
www.systec-electronic.com
Project: openPOWERLINK
Description: source file for EPL API module (process image)
License:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of SYSTEC electronic GmbH nor the names of its
contributors may be used to endorse or promote products derived
from this software without prior written permission. For written
permission, please contact info@systec-electronic.com.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Severability Clause:
If a provision of this License is or becomes illegal, invalid or
unenforceable in any jurisdiction, that shall not affect:
1. the validity or enforceability in that jurisdiction of any other
provision of this License; or
2. the validity or enforceability in other jurisdictions of that or
any other provision of this License.
-------------------------------------------------------------------------
$RCSfile: EplApiProcessImage.c,v $
$Author: D.Krueger $
$Revision: 1.7 $ $Date: 2008/11/13 17:13:09 $
$State: Exp $
Build Environment:
GCC V3.4
-------------------------------------------------------------------------
Revision History:
2006/10/10 d.k.: start of the implementation, version 1.00
****************************************************************************/
#include "Epl.h"
#include <linux/uaccess.h>
/***************************************************************************/
/* */
/* */
/* G L O B A L D E F I N I T I O N S */
/* */
/* */
/***************************************************************************/
//---------------------------------------------------------------------------
// const defines
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// local types
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// modul globale vars
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// local function prototypes
//---------------------------------------------------------------------------
/***************************************************************************/
/* */
/* */
/* C L A S S EplApi */
/* */
/* */
/***************************************************************************/
//
// Description:
//
//
/***************************************************************************/
//=========================================================================//
// //
// P R I V A T E D E F I N I T I O N S //
// //
//=========================================================================//
//---------------------------------------------------------------------------
// const defines
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// local types
//---------------------------------------------------------------------------
#if ((EPL_API_PROCESS_IMAGE_SIZE_IN > 0) || (EPL_API_PROCESS_IMAGE_SIZE_OUT > 0))
typedef struct {
#if EPL_API_PROCESS_IMAGE_SIZE_IN > 0
u8 m_abProcessImageInput[EPL_API_PROCESS_IMAGE_SIZE_IN];
#endif
#if EPL_API_PROCESS_IMAGE_SIZE_OUT > 0
u8 m_abProcessImageOutput[EPL_API_PROCESS_IMAGE_SIZE_OUT];
#endif
} tEplApiProcessImageInstance;
//---------------------------------------------------------------------------
// local vars
//---------------------------------------------------------------------------
static tEplApiProcessImageInstance EplApiProcessImageInstance_g;
#endif
//---------------------------------------------------------------------------
// local function prototypes
//---------------------------------------------------------------------------
//=========================================================================//
// //
// P U B L I C F U N C T I O N S //
// //
//=========================================================================//
//---------------------------------------------------------------------------
//
// Function: EplApiProcessImageSetup()
//
// Description: sets up static process image
//
// Parameters: (none)
//
// Returns: tEplKernel = error code
//
//
// State:
//
//---------------------------------------------------------------------------
tEplKernel EplApiProcessImageSetup(void)
{
tEplKernel Ret = kEplSuccessful;
#if ((EPL_API_PROCESS_IMAGE_SIZE_IN > 0) || (EPL_API_PROCESS_IMAGE_SIZE_OUT > 0))
unsigned int uiVarEntries;
tEplObdSize ObdSize;
#endif
#if EPL_API_PROCESS_IMAGE_SIZE_IN > 0
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_IN;
ObdSize = 1;
Ret = EplApiLinkObject(0x2000,
EplApiProcessImageInstance_g.
m_abProcessImageInput, &uiVarEntries, &ObdSize,
1);
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_IN;
ObdSize = 1;
Ret = EplApiLinkObject(0x2001,
EplApiProcessImageInstance_g.
m_abProcessImageInput, &uiVarEntries, &ObdSize,
1);
ObdSize = 2;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_IN / ObdSize;
Ret = EplApiLinkObject(0x2010,
EplApiProcessImageInstance_g.
m_abProcessImageInput, &uiVarEntries, &ObdSize,
1);
ObdSize = 2;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_IN / ObdSize;
Ret = EplApiLinkObject(0x2011,
EplApiProcessImageInstance_g.
m_abProcessImageInput, &uiVarEntries, &ObdSize,
1);
ObdSize = 4;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_IN / ObdSize;
Ret = EplApiLinkObject(0x2020,
EplApiProcessImageInstance_g.
m_abProcessImageInput, &uiVarEntries, &ObdSize,
1);
ObdSize = 4;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_IN / ObdSize;
Ret = EplApiLinkObject(0x2021,
EplApiProcessImageInstance_g.
m_abProcessImageInput, &uiVarEntries, &ObdSize,
1);
#endif
#if EPL_API_PROCESS_IMAGE_SIZE_OUT > 0
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_OUT;
ObdSize = 1;
Ret = EplApiLinkObject(0x2030,
EplApiProcessImageInstance_g.
m_abProcessImageOutput, &uiVarEntries, &ObdSize,
1);
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_OUT;
ObdSize = 1;
Ret = EplApiLinkObject(0x2031,
EplApiProcessImageInstance_g.
m_abProcessImageOutput, &uiVarEntries, &ObdSize,
1);
ObdSize = 2;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_OUT / ObdSize;
Ret = EplApiLinkObject(0x2040,
EplApiProcessImageInstance_g.
m_abProcessImageOutput, &uiVarEntries, &ObdSize,
1);
ObdSize = 2;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_OUT / ObdSize;
Ret = EplApiLinkObject(0x2041,
EplApiProcessImageInstance_g.
m_abProcessImageOutput, &uiVarEntries, &ObdSize,
1);
ObdSize = 4;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_OUT / ObdSize;
Ret = EplApiLinkObject(0x2050,
EplApiProcessImageInstance_g.
m_abProcessImageOutput, &uiVarEntries, &ObdSize,
1);
ObdSize = 4;
uiVarEntries = EPL_API_PROCESS_IMAGE_SIZE_OUT / ObdSize;
Ret = EplApiLinkObject(0x2051,
EplApiProcessImageInstance_g.
m_abProcessImageOutput, &uiVarEntries, &ObdSize,
1);
#endif
return Ret;
}
//----------------------------------------------------------------------------
// Function: EplApiProcessImageExchangeIn()
//
// Description: replaces passed input process image with the one of EPL stack
//
// Parameters: pPI_p = input process image
//
// Returns: tEplKernel = error code
//
// State:
//----------------------------------------------------------------------------
tEplKernel EplApiProcessImageExchangeIn(tEplApiProcessImage *pPI_p)
{
tEplKernel Ret = kEplSuccessful;
#if EPL_API_PROCESS_IMAGE_SIZE_IN > 0
copy_to_user(pPI_p->m_pImage,
EplApiProcessImageInstance_g.m_abProcessImageInput,
min(pPI_p->m_uiSize,
sizeof(EplApiProcessImageInstance_g.
m_abProcessImageInput)));
#endif
return Ret;
}
//----------------------------------------------------------------------------
// Function: EplApiProcessImageExchangeOut()
//
// Description: copies passed output process image to EPL stack.
//
// Parameters: pPI_p = output process image
//
// Returns: tEplKernel = error code
//
// State:
//----------------------------------------------------------------------------
tEplKernel EplApiProcessImageExchangeOut(tEplApiProcessImage *pPI_p)
{
tEplKernel Ret = kEplSuccessful;
#if EPL_API_PROCESS_IMAGE_SIZE_OUT > 0
copy_from_user(EplApiProcessImageInstance_g.m_abProcessImageOutput,
pPI_p->m_pImage,
min(pPI_p->m_uiSize,
sizeof(EplApiProcessImageInstance_g.
m_abProcessImageOutput)));
#endif
return Ret;
}
//=========================================================================//
// //
// P R I V A T E F U N C T I O N S //
// //
//=========================================================================//
// EOF
此差异已折叠。
此差异已折叠。
此差异已折叠。
/****************************************************************************
(c) SYSTEC electronic GmbH, D-07973 Greiz, August-Bebel-Str. 29
www.systec-electronic.com
Project: openPOWERLINK
Description: include file for DLL Communication Abstraction Layer module
License:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of SYSTEC electronic GmbH nor the names of its
contributors may be used to endorse or promote products derived
from this software without prior written permission. For written
permission, please contact info@systec-electronic.com.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Severability Clause:
If a provision of this License is or becomes illegal, invalid or
unenforceable in any jurisdiction, that shall not affect:
1. the validity or enforceability in that jurisdiction of any other
provision of this License; or
2. the validity or enforceability in other jurisdictions of that or
any other provision of this License.
-------------------------------------------------------------------------
$RCSfile: EplDllCal.h,v $
$Author: D.Krueger $
$Revision: 1.4 $ $Date: 2008/04/17 21:36:32 $
$State: Exp $
Build Environment:
GCC V3.4
-------------------------------------------------------------------------
Revision History:
2006/06/20 d.k.: start of the implementation, version 1.00
****************************************************************************/
#ifndef _EPL_DLLCAL_H_
#define _EPL_DLLCAL_H_
//---------------------------------------------------------------------------
// const defines
//---------------------------------------------------------------------------
/*#ifndef EPL_DLLCAL_BUFFER_ID_RX
#define EPL_DLLCAL_BUFFER_ID_RX "EplSblDllCalRx"
#endif
#ifndef EPL_DLLCAL_BUFFER_SIZE_RX
#define EPL_DLLCAL_BUFFER_SIZE_RX 32767
#endif
*/
#ifndef EPL_DLLCAL_BUFFER_ID_TX_NMT
#define EPL_DLLCAL_BUFFER_ID_TX_NMT "EplSblDllCalTxNmt"
#endif
#ifndef EPL_DLLCAL_BUFFER_SIZE_TX_NMT
#define EPL_DLLCAL_BUFFER_SIZE_TX_NMT 32767
#endif
#ifndef EPL_DLLCAL_BUFFER_ID_TX_GEN
#define EPL_DLLCAL_BUFFER_ID_TX_GEN "EplSblDllCalTxGen"
#endif
#ifndef EPL_DLLCAL_BUFFER_SIZE_TX_GEN
#define EPL_DLLCAL_BUFFER_SIZE_TX_GEN 32767
#endif
//---------------------------------------------------------------------------
// typedef
//---------------------------------------------------------------------------
typedef struct {
tEplDllAsndServiceId m_ServiceId;
tEplDllAsndFilter m_Filter;
} tEplDllCalAsndServiceIdFilter;
typedef struct {
tEplDllReqServiceId m_Service;
unsigned int m_uiNodeId;
u8 m_bSoaFlag1;
} tEplDllCalIssueRequest;
//---------------------------------------------------------------------------
// function prototypes
//---------------------------------------------------------------------------
#endif // #ifndef _EPL_DLLKCAL_H_
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
config EPL
tristate "openPOWERLINK protocol stack"
depends on NET && HIGH_RES_TIMERS && X86
default N
---help---
Enable support for the openPOWERLINK network protocol stack.
obj-$(CONFIG_EPL) += epl.o
epl-objs := \
EplApiGeneric.o \
EplApiLinuxKernel.o \
EplApiProcessImage.o \
EplDllk.o \
EplDllkCal.o \
EplDlluCal.o \
EplErrorHandlerk.o \
EplEventk.o \
EplEventu.o \
EplIdentu.o \
EplNmtCnu.o \
EplNmtk.o \
EplNmtkCal.o \
EplNmtMnu.o \
EplNmtu.o \
EplNmtuCal.o \
EplObd.o \
EplObdkCal.o \
EplObdu.o \
EplObduCal.o \
EplPdok.o \
EplPdokCal.o \
EplPdou.o \
EplSdoAsndu.o \
EplSdoAsySequ.o \
EplSdoComu.o \
EplSdoUdpu.o \
EplStatusu.o \
EplTimeruLinuxKernel.o \
amix86.o \
SharedBuff.o \
ShbIpc-LinuxKernel.o \
TimerHighReskX86.o \
VirtualEthernetLinux.o \
SocketLinuxKernel.o \
proc_fs.o \
demo_main.o \
Edrv8139.o \
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册