67 | Generated on Wed Mar 11 2015 20:44:24 for SOEM by
68 |
69 | 1.7.4
70 |
71 |
72 |
--------------------------------------------------------------------------------
/doc/html/tab_a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/doc/html/tab_a.png
--------------------------------------------------------------------------------
/doc/html/tab_b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/doc/html/tab_b.png
--------------------------------------------------------------------------------
/doc/html/tab_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/doc/html/tab_h.png
--------------------------------------------------------------------------------
/doc/html/tab_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/doc/html/tab_s.png
--------------------------------------------------------------------------------
/doc/html/tabs.css:
--------------------------------------------------------------------------------
1 | .tabs, .tabs2, .tabs3 {
2 | background-image: url('tab_b.png');
3 | width: 100%;
4 | z-index: 101;
5 | font-size: 13px;
6 | }
7 |
8 | .tabs2 {
9 | font-size: 10px;
10 | }
11 | .tabs3 {
12 | font-size: 9px;
13 | }
14 |
15 | .tablist {
16 | margin: 0;
17 | padding: 0;
18 | display: table;
19 | }
20 |
21 | .tablist li {
22 | float: left;
23 | display: table-cell;
24 | background-image: url('tab_b.png');
25 | line-height: 36px;
26 | list-style: none;
27 | }
28 |
29 | .tablist a {
30 | display: block;
31 | padding: 0 20px;
32 | font-weight: bold;
33 | background-image:url('tab_s.png');
34 | background-repeat:no-repeat;
35 | background-position:right;
36 | color: #283A5D;
37 | text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
38 | text-decoration: none;
39 | outline: none;
40 | }
41 |
42 | .tabs3 .tablist a {
43 | padding: 0 10px;
44 | }
45 |
46 | .tablist a:hover {
47 | background-image: url('tab_h.png');
48 | background-repeat:repeat-x;
49 | color: #fff;
50 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
51 | text-decoration: none;
52 | }
53 |
54 | .tablist li.current a {
55 | background-image: url('tab_a.png');
56 | background-repeat:repeat-x;
57 | color: #fff;
58 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
59 | }
60 |
--------------------------------------------------------------------------------
/doc/images/memory_layout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/doc/images/memory_layout.png
--------------------------------------------------------------------------------
/drvcomment.txt:
--------------------------------------------------------------------------------
1 | For faster irq response through the NIC/NAPI/Socket layer set for TG3 (at eth0)
2 | ethtool -C eth0 rx-usecs 0 rx-frames 1 tx-usecs 0 tx-frames 1
3 |
--------------------------------------------------------------------------------
/osal/intime/osal.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/osal/intime/osal.c
--------------------------------------------------------------------------------
/osal/intime/osal_defs.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/osal/intime/osal_defs.h
--------------------------------------------------------------------------------
/osal/linux/Makefile:
--------------------------------------------------------------------------------
1 | #******************************************************************************
2 | # * *** ***
3 | # *** *** ***
4 | # *** **** ********** *** ***** *** **** *****
5 | # ********* ********** *** ********* ************ *********
6 | # **** *** *** *** *** **** ***
7 | # *** *** ****** *** *********** *** **** *****
8 | # *** *** ****** *** ************* *** **** *****
9 | # *** **** **** *** *** *** **** ***
10 | # *** ******* ***** ************** ************* *********
11 | # *** ***** *** ******* ** ** ****** *****
12 | # t h e r e a l t i m e t a r g e t e x p e r t s
13 | #
14 | # http://www.rt-labs.com
15 | # Copyright (C) 2009. rt-labs AB, Sweden. All rights reserved.
16 | #------------------------------------------------------------------------------
17 | # $Id: Makefile 125 2012-04-01 17:36:17Z rtlaka $
18 | #------------------------------------------------------------------------------
19 |
20 | LIBNAME = osal
21 | include $(PRJ_ROOT)/make/lib.mk
22 |
--------------------------------------------------------------------------------
/osal/linux/osal.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/osal/linux/osal.c
--------------------------------------------------------------------------------
/osal/linux/osal_defs.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/osal/linux/osal_defs.h
--------------------------------------------------------------------------------
/osal/osal.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * * *** ***
3 | * *** *** ***
4 | * *** **** ********** *** ***** *** **** *****
5 | * ********* ********** *** ********* ************ *********
6 | * **** *** *** *** *** **** ***
7 | * *** *** ****** *** *********** *** **** *****
8 | * *** *** ****** *** ************* *** **** *****
9 | * *** **** **** *** *** *** **** ***
10 | * *** ******* ***** ************** ************* *********
11 | * *** ***** *** ******* ** ** ****** *****
12 | * t h e r e a l t i m e t a r g e t e x p e r t s
13 | *
14 | * http://www.rt-labs.com
15 | * Copyright (C) 2009. rt-labs AB, Sweden. All rights reserved.
16 | *------------------------------------------------------------------------------
17 | * $Id: osal.h 473 2013-04-08 11:43:02Z rtlaka $
18 | *------------------------------------------------------------------------------
19 | */
20 |
21 | #ifndef _osal_
22 | #define _osal_
23 |
24 | #include
25 | #include
26 |
27 | /* General types */
28 | typedef uint8_t boolean;
29 | #define TRUE 1
30 | #define FALSE 0
31 | typedef int8_t int8;
32 | typedef int16_t int16;
33 | typedef int32_t int32;
34 | typedef uint8_t uint8;
35 | typedef uint16_t uint16;
36 | typedef uint32_t uint32;
37 | typedef int64_t int64;
38 | typedef uint64_t uint64;
39 | typedef float float32;
40 | typedef double float64;
41 |
42 | typedef struct
43 | {
44 | uint32 sec; /*< Seconds elapsed since the Epoch (Jan 1, 1970) */
45 | uint32 usec; /*< Microseconds elapsed since last second boundary */
46 | } ec_timet;
47 |
48 | typedef struct osal_timer
49 | {
50 | ec_timet stop_time;
51 | } osal_timert;
52 |
53 | void osal_timer_start(osal_timert * self, uint32 timeout_us);
54 | boolean osal_timer_is_expired(osal_timert * self);
55 | int osal_usleep(uint32 usec);
56 | ec_timet osal_current_time(void);
57 | void osal_time_diff(ec_timet *start, ec_timet *end, ec_timet *diff);
58 | int osal_thread_create(void *thandle, int stacksize, void *func, void *param);
59 | int osal_thread_create_rt(void *thandle, int stacksize, void *func, void *param);
60 |
61 | #endif
62 |
--------------------------------------------------------------------------------
/osal/rtk/Makefile:
--------------------------------------------------------------------------------
1 | #******************************************************************************
2 | # * *** ***
3 | # *** *** ***
4 | # *** **** ********** *** ***** *** **** *****
5 | # ********* ********** *** ********* ************ *********
6 | # **** *** *** *** *** **** ***
7 | # *** *** ****** *** *********** *** **** *****
8 | # *** *** ****** *** ************* *** **** *****
9 | # *** **** **** *** *** *** **** ***
10 | # *** ******* ***** ************** ************* *********
11 | # *** ***** *** ******* ** ** ****** *****
12 | # t h e r e a l t i m e t a r g e t e x p e r t s
13 | #
14 | # http://www.rt-labs.com
15 | # Copyright (C) 2009. rt-labs AB, Sweden. All rights reserved.
16 | #------------------------------------------------------------------------------
17 | # $Id: Makefile 411 2012-12-02 20:16:39Z rtlaka $
18 | #------------------------------------------------------------------------------
19 |
20 | LIBNAME = osal
21 | include $(PRJ_ROOT)/make/lib.mk
22 |
--------------------------------------------------------------------------------
/osal/rtk/osal.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/osal/rtk/osal.c
--------------------------------------------------------------------------------
/osal/rtk/osal_defs.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * * *** ***
3 | * *** *** ***
4 | * *** **** ********** *** ***** *** **** *****
5 | * ********* ********** *** ********* ************ *********
6 | * **** *** *** *** *** **** ***
7 | * *** *** ****** *** *********** *** **** *****
8 | * *** *** ****** *** ************* *** **** *****
9 | * *** **** **** *** *** *** **** ***
10 | * *** ******* ***** ************** ************* *********
11 | * *** ***** *** ******* ** ** ****** *****
12 | * t h e r e a l t i m e t a r g e t e x p e r t s
13 | *
14 | * http://www.rt-labs.com
15 | * Copyright (C) 2009. rt-labs AB, Sweden. All rights reserved.
16 | *------------------------------------------------------------------------------
17 | * $Id: osal_defs.h 472 2013-04-08 11:39:51Z rtlaka $
18 | *------------------------------------------------------------------------------
19 | */
20 |
21 | #ifndef _osal_defs_
22 | #define _osal_defs_
23 |
24 | #ifndef PACKED
25 | #define PACKED_BEGIN
26 | #define PACKED __attribute__((__packed__))
27 | #define PACKED_END
28 | #endif
29 |
30 | #define OSAL_THREAD_HANDLE task_t *
31 | #define OSAL_THREAD_FUNC void
32 | #define OSAL_THREAD_FUNC_RT void
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/osal/stm32f4/osal.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/osal/stm32f4/osal.c
--------------------------------------------------------------------------------
/osal/stm32f4/osal_defs.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * * *** ***
3 | * *** *** ***
4 | * *** **** ********** *** ***** *** **** *****
5 | * ********* ********** *** ********* ************ *********
6 | * **** *** *** *** *** **** ***
7 | * *** *** ****** *** *********** *** **** *****
8 | * *** *** ****** *** ************* *** **** *****
9 | * *** **** **** *** *** *** **** ***
10 | * *** ******* ***** ************** ************* *********
11 | * *** ***** *** ******* ** ** ****** *****
12 | * t h e r e a l t i m e t a r g e t e x p e r t s
13 | *
14 | * http://www.rt-labs.com
15 | * Copyright (C) 2009. rt-labs AB, Sweden. All rights reserved.
16 | *------------------------------------------------------------------------------
17 | * $Id: osal_defs.h 472 2013-04-08 11:39:51Z rtlaka $
18 | *------------------------------------------------------------------------------
19 | */
20 |
21 | #ifndef _osal_defs_
22 | #define _osal_defs_
23 |
24 | #ifndef PACKED
25 | #define PACKED_BEGIN
26 | #define PACKED __attribute__((__packed__))
27 | #define PACKED_END
28 | #endif
29 |
30 | #include "simstruc.h"
31 |
32 | void osalSetSimStruct(SimStruct *S_);
33 |
34 |
35 | //#define OSAL_THREAD_HANDLE task_t *
36 | #define OSAL_THREAD_FUNC void
37 | #define OSAL_THREAD_FUNC_RT void
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/osal/win32/Makefile:
--------------------------------------------------------------------------------
1 | #******************************************************************************
2 | # * *** ***
3 | # *** *** ***
4 | # *** **** ********** *** ***** *** **** *****
5 | # ********* ********** *** ********* ************ *********
6 | # **** *** *** *** *** **** ***
7 | # *** *** ****** *** *********** *** **** *****
8 | # *** *** ****** *** ************* *** **** *****
9 | # *** **** **** *** *** *** **** ***
10 | # *** ******* ***** ************** ************* *********
11 | # *** ***** *** ******* ** ** ****** *****
12 | # t h e r e a l t i m e t a r g e t e x p e r t s
13 | #
14 | # http://www.rt-labs.com
15 | # Copyright (C) 2009. rt-labs AB, Sweden. All rights reserved.
16 | #------------------------------------------------------------------------------
17 | # $Id: Makefile 262 2012-08-14 06:14:07Z rtlaka $
18 | #------------------------------------------------------------------------------
19 |
20 | LIBNAME = osal
21 | include $(PRJ_ROOT)/make/lib.mk
22 |
--------------------------------------------------------------------------------
/osal/win32/osal.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/osal/win32/osal.c
--------------------------------------------------------------------------------
/osal/win32/osal_defs.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/osal/win32/osal_defs.h
--------------------------------------------------------------------------------
/osal/win32/osal_win32.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/osal/win32/osal_win32.h
--------------------------------------------------------------------------------
/oshw/intime/nicdrv.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/oshw/intime/nicdrv.h
--------------------------------------------------------------------------------
/oshw/intime/oshw.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/oshw/intime/oshw.c
--------------------------------------------------------------------------------
/oshw/intime/oshw.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/oshw/intime/oshw.h
--------------------------------------------------------------------------------
/oshw/linux/Makefile:
--------------------------------------------------------------------------------
1 | #******************************************************************************
2 | # * *** ***
3 | # *** *** ***
4 | # *** **** ********** *** ***** *** **** *****
5 | # ********* ********** *** ********* ************ *********
6 | # **** *** *** *** *** **** ***
7 | # *** *** ****** *** *********** *** **** *****
8 | # *** *** ****** *** ************* *** **** *****
9 | # *** **** **** *** *** *** **** ***
10 | # *** ******* ***** ************** ************* *********
11 | # *** ***** *** ******* ** ** ****** *****
12 | # t h e r e a l t i m e t a r g e t e x p e r t s
13 | #
14 | # http://www.rt-labs.com
15 | # Copyright (C) 2009. rt-labs AB, Sweden. All rights reserved.
16 | #------------------------------------------------------------------------------
17 | # $Id: Makefile 125 2012-04-01 17:36:17Z rtlaka $
18 | #------------------------------------------------------------------------------
19 |
20 | LIBNAME = oshw
21 | include $(PRJ_ROOT)/make/lib.mk
22 |
--------------------------------------------------------------------------------
/oshw/linux/oshw.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/oshw/linux/oshw.c
--------------------------------------------------------------------------------
/oshw/linux/oshw.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/oshw/linux/oshw.h
--------------------------------------------------------------------------------
/oshw/rtk/fec/fec_ecat.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * * *** ***
3 | * *** *** ***
4 | * *** **** ********** *** ***** *** **** *****
5 | * ********* ********** *** ********* ************ *********
6 | * **** *** *** *** *** **** ***
7 | * *** *** ****** *** *********** *** **** *****
8 | * *** *** ****** *** ************* *** **** *****
9 | * *** **** **** *** *** *** **** ***
10 | * *** ******* ***** ************** ************* *********
11 | * *** ***** *** ******* ** ** ****** *****
12 | * t h e r e a l t i m e t a r g e t e x p e r t s
13 | *
14 | * http://www.rt-labs.com
15 | * Copyright (C) 2007. rt-labs AB, Sweden. All rights reserved.
16 | *------------------------------------------------------------------------------
17 | * $Id: fec_ecat.h 91 2014-04-02 13:32:29Z rtlfrm $
18 | *------------------------------------------------------------------------------
19 | */
20 |
21 | /**
22 | * \defgroup fec EtherCat Ethernet MAC driver for Frescale K60 SoCs.
23 | *
24 | * \{
25 | */
26 |
27 | #ifndef FEC_H
28 | #define FEC_H
29 |
30 | #include
31 |
32 | #ifdef __cplusplus
33 | extern "C"
34 | {
35 | #endif
36 |
37 | typedef struct fec_mac_address
38 | {
39 | uint8_t octet[6];
40 | } fec_mac_address_t;
41 |
42 | int fec_ecat_init (const fec_mac_address_t * mac_address, bool phy_loopback_mode);
43 |
44 | int fec_ecat_send (const void *payload, size_t tot_len);
45 |
46 | int fec_ecat_recv (void * buffer, size_t buffer_length);
47 |
48 | #ifdef __cplusplus
49 | }
50 | #endif
51 |
52 | #endif /* FEC_H */
53 |
54 | /**
55 | * \}
56 | */
57 |
--------------------------------------------------------------------------------
/oshw/rtk/lw_mac/lw_emac.h:
--------------------------------------------------------------------------------
1 | /*
2 | * author: Tomas Vestelind
3 | */
4 |
5 | #ifndef LWIP_MAC_H
6 | #define LWIP_MAC_H
7 |
8 | int bfin_EMAC_init(uint8_t *enetaddr);
9 | int bfin_EMAC_send(void *packet, int length);
10 | int bfin_EMAC_recv(uint8_t * packet, size_t size);
11 |
12 | #endif /* LWIP_MAC_H */
13 |
--------------------------------------------------------------------------------
/oshw/rtk/oshw.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/oshw/rtk/oshw.c
--------------------------------------------------------------------------------
/oshw/rtk/oshw.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/oshw/rtk/oshw.h
--------------------------------------------------------------------------------
/oshw/stm32f4/ertethercatinit.mexw64:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/oshw/stm32f4/ertethercatinit.mexw64
--------------------------------------------------------------------------------
/oshw/stm32f4/ertethercatinit.tlc:
--------------------------------------------------------------------------------
1 | %% File : xpcethercatinit.tlc
2 | %%
3 | %% Description:
4 | %% TLC Code Generation file for GenericFilter
5 | %%
6 |
7 | %% Copyright 2009-2010 The MathWorks, Inc.
8 |
9 |
10 | %implements ertethercatinit "C"
11 |
12 |
13 | %% Function: Start ============================================================
14 | %%
15 | %function Start(block, system) Output
16 | %
17 | %
18 | {
19 |
20 | %% RCC_AHB1PeriphClockCmd(GpioClockEnableBit(GPIOD), ENABLE);
21 | %% RCC_AHB1PeriphClockCmd(((uint32_t) (1U << (uint32_t)GPIOD)), ENABLE);
22 | RCC_AHB1PeriphClockCmd((uint32_t) (1U << 3U), ENABLE);
23 |
24 | GPIO_InitTypeDef gpioInit;
25 | GPIO_StructInit(&gpioInit);
26 | gpioInit.GPIO_Pin = GPIO_Pin_12;
27 | %% gpioInit.GPIO_Pin = 12;
28 | gpioInit.GPIO_Mode = GPIO_Mode_OUT;
29 | GPIO_Init(GPIOD,&gpioInit);
30 | GPIO_WriteBit(GPIOD, GPIO_Pin_12,1);
31 |
32 | ec_init("");
33 |
34 | /* From LinkOsLayer.h Intel PRO-100 specific definitions */
35 | }
36 | %endfunction
37 |
38 | %function BlockTypeSetup(block, system) void
39 | %
40 | %
41 |
42 | %endfunction
43 |
44 | %% Function: BlockInstanceSetup ===========================================
45 | %%
46 | %function BlockInstanceSetup(block, system) void
47 |
48 | %% %
49 | %% %
50 | %assign pathErtEthercat = FEVAL("getErtEthercatPath")
51 | %assign pathEthercatMain=pathErtEthercat+"/../../soem/ethercatmain"
52 | %
53 | %assign pathEthercatBase=pathErtEthercat+"/../../soem/ethercatbase"
54 | %
55 | %assign pathEthercatNicdrv=pathErtEthercat+"/nicdrv"
56 | %
57 | %assign pathEthercatHw=pathErtEthercat+"/oshw"
58 | %
59 | %assign pathEthercatOsal=pathErtEthercat+"/../../osal/stm32f4/osal"
60 | %
61 |
62 | %% Test for the presence of the EtherCAT library
63 | %assign fileName=FEVAL("xpcroot") + "/target/build/xpcblocks/lib/AtEcat_xpc_vc.lib"
64 | %if !FEVAL("exist", fileName)
65 | %exit xPCTarget: EtherCAT: To enable functionality, download EtherCAT library from www.mathworks.com/programs/ethercat/
66 | %endif
67 |
68 | %endfunction
69 |
70 |
71 | %% Function: Outputs ======================================================
72 | %%
73 | %function Outputs(block, system) Output
74 | %% No ouputs.
75 | %% Call the error handler and handler.
76 |
77 | %openfile buffer
78 |
79 | /*------------ % Block: % Process Received Frames ------------*/
80 |
81 |
82 | %% xpcEtherCATReadProcessData(%,NULL);
83 |
84 | %closefile buffer
85 | %
86 |
87 | %openfile buffer
88 | {
89 |
90 |
91 | // Clear all momentary triggered values
92 | }
93 | %closefile buffer
94 | %
95 | %endfunction
96 |
97 | %% Function: Terminate ===========================================
98 | %%
99 | %function Terminate(block, system) Output
100 |
101 |
102 | %openfile buffer
103 |
104 | /*------------ % Block: % Process Shutdown Network ------------*/
105 | {
106 |
107 |
108 | }
109 |
110 | %closefile buffer
111 | %
112 |
113 | %endfunction
114 |
115 |
--------------------------------------------------------------------------------
/oshw/stm32f4/getErtEthercatPath.m:
--------------------------------------------------------------------------------
1 | function pkgPath = getErtEthercatPath()
2 | [pkgPath, ~, ~] = fileparts(mfilename('fullpath'));
--------------------------------------------------------------------------------
/oshw/stm32f4/oshw.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/oshw/stm32f4/oshw.c
--------------------------------------------------------------------------------
/oshw/stm32f4/oshw.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/oshw/stm32f4/oshw.h
--------------------------------------------------------------------------------
/oshw/stm32f4/uart.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/oshw/stm32f4/uart.h
--------------------------------------------------------------------------------
/oshw/win32/oshw.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/oshw/win32/oshw.c
--------------------------------------------------------------------------------
/oshw/win32/oshw.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/oshw/win32/oshw.h
--------------------------------------------------------------------------------
/oshw/win32/wpcap/Include/Win32-Extensions.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
3 | * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
4 | * All rights reserved.
5 | *
6 | * Redistribution and use in source and binary forms, with or without
7 | * modification, are permitted provided that the following conditions
8 | * are met:
9 | *
10 | * 1. Redistributions of source code must retain the above copyright
11 | * notice, this list of conditions and the following disclaimer.
12 | * 2. Redistributions in binary form must reproduce the above copyright
13 | * notice, this list of conditions and the following disclaimer in the
14 | * documentation and/or other materials provided with the distribution.
15 | * 3. Neither the name of the Politecnico di Torino, CACE Technologies
16 | * nor the names of its contributors may be used to endorse or promote
17 | * products derived from this software without specific prior written
18 | * permission.
19 | *
20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | *
32 | */
33 |
34 | #ifndef __WIN32_EXTENSIONS_H__
35 | #define __WIN32_EXTENSIONS_H__
36 |
37 | #ifdef __cplusplus
38 | extern "C" {
39 | #endif
40 |
41 | /* Definitions */
42 |
43 | /*!
44 | \brief A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit().
45 | */
46 | struct pcap_send_queue
47 | {
48 | u_int maxlen; ///< Maximum size of the the queue, in bytes. This variable contains the size of the buffer field.
49 | u_int len; ///< Current size of the queue, in bytes.
50 | char *buffer; ///< Buffer containing the packets to be sent.
51 | };
52 |
53 | typedef struct pcap_send_queue pcap_send_queue;
54 |
55 | /*!
56 | \brief This typedef is a support for the pcap_get_airpcap_handle() function
57 | */
58 | #if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_)
59 | #define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_
60 | typedef struct _AirpcapHandle *PAirpcapHandle;
61 | #endif
62 |
63 | #define BPF_MEM_EX_IMM 0xc0
64 | #define BPF_MEM_EX_IND 0xe0
65 |
66 | /*used for ST*/
67 | #define BPF_MEM_EX 0xc0
68 | #define BPF_TME 0x08
69 |
70 | #define BPF_LOOKUP 0x90
71 | #define BPF_EXECUTE 0xa0
72 | #define BPF_INIT 0xb0
73 | #define BPF_VALIDATE 0xc0
74 | #define BPF_SET_ACTIVE 0xd0
75 | #define BPF_RESET 0xe0
76 | #define BPF_SET_MEMORY 0x80
77 | #define BPF_GET_REGISTER_VALUE 0x70
78 | #define BPF_SET_REGISTER_VALUE 0x60
79 | #define BPF_SET_WORKING 0x50
80 | #define BPF_SET_ACTIVE_READ 0x40
81 | #define BPF_SET_AUTODELETION 0x30
82 | #define BPF_SEPARATION 0xff
83 |
84 | /* Prototypes */
85 | pcap_send_queue* pcap_sendqueue_alloc(u_int memsize);
86 |
87 | void pcap_sendqueue_destroy(pcap_send_queue* queue);
88 |
89 | int pcap_sendqueue_queue(pcap_send_queue* queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data);
90 |
91 | u_int pcap_sendqueue_transmit(pcap_t *p, pcap_send_queue* queue, int sync);
92 |
93 | HANDLE pcap_getevent(pcap_t *p);
94 |
95 | struct pcap_stat *pcap_stats_ex(pcap_t *p, int *pcap_stat_size);
96 |
97 | int pcap_setuserbuffer(pcap_t *p, int size);
98 |
99 | int pcap_live_dump(pcap_t *p, char *filename, int maxsize, int maxpacks);
100 |
101 | int pcap_live_dump_ended(pcap_t *p, int sync);
102 |
103 | int pcap_offline_filter(struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data);
104 |
105 | int pcap_start_oem(char* err_str, int flags);
106 |
107 | PAirpcapHandle pcap_get_airpcap_handle(pcap_t *p);
108 |
109 | #ifdef __cplusplus
110 | }
111 | #endif
112 |
113 | #endif //__WIN32_EXTENSIONS_H__
114 |
--------------------------------------------------------------------------------
/oshw/win32/wpcap/Include/pcap-bpf.h:
--------------------------------------------------------------------------------
1 | /*-
2 | * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
3 | * The Regents of the University of California. All rights reserved.
4 | *
5 | * This code is derived from the Stanford/CMU enet packet filter,
6 | * (net/enet.c) distributed as part of 4.3BSD, and code contributed
7 | * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
8 | * Berkeley Laboratory.
9 | *
10 | * Redistribution and use in source and binary forms, with or without
11 | * modification, are permitted provided that the following conditions
12 | * are met:
13 | * 1. Redistributions of source code must retain the above copyright
14 | * notice, this list of conditions and the following disclaimer.
15 | * 2. Redistributions in binary form must reproduce the above copyright
16 | * notice, this list of conditions and the following disclaimer in the
17 | * documentation and/or other materials provided with the distribution.
18 | * 3. All advertising materials mentioning features or use of this software
19 | * must display the following acknowledgement:
20 | * This product includes software developed by the University of
21 | * California, Berkeley and its contributors.
22 | * 4. Neither the name of the University nor the names of its contributors
23 | * may be used to endorse or promote products derived from this software
24 | * without specific prior written permission.
25 | *
26 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 | * SUCH DAMAGE.
37 | *
38 | * @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.50 2007/04/01 21:43:55 guy Exp $ (LBL)
39 | */
40 |
41 | /*
42 | * For backwards compatibility.
43 | *
44 | * Note to OS vendors: do NOT get rid of this file! Some applications
45 | * might expect to be able to include .
46 | */
47 | #include
48 |
--------------------------------------------------------------------------------
/oshw/win32/wpcap/Include/pcap-namedb.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 1994, 1996
3 | * The Regents of the University of California. All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without
6 | * modification, are permitted provided that the following conditions
7 | * are met:
8 | * 1. Redistributions of source code must retain the above copyright
9 | * notice, this list of conditions and the following disclaimer.
10 | * 2. Redistributions in binary form must reproduce the above copyright
11 | * notice, this list of conditions and the following disclaimer in the
12 | * documentation and/or other materials provided with the distribution.
13 | * 3. All advertising materials mentioning features or use of this software
14 | * must display the following acknowledgement:
15 | * This product includes software developed by the Computer Systems
16 | * Engineering Group at Lawrence Berkeley Laboratory.
17 | * 4. Neither the name of the University nor of the Laboratory may be used
18 | * to endorse or promote products derived from this software without
19 | * specific prior written permission.
20 | *
21 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 | * SUCH DAMAGE.
32 | *
33 | * @(#) $Header: /tcpdump/master/libpcap/pcap-namedb.h,v 1.13 2006/10/04 18:13:32 guy Exp $ (LBL)
34 | */
35 |
36 | /*
37 | * For backwards compatibility.
38 | *
39 | * Note to OS vendors: do NOT get rid of this file! Some applications
40 | * might expect to be able to include .
41 | */
42 | #include
43 |
--------------------------------------------------------------------------------
/oshw/win32/wpcap/Include/pcap-stdinc.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2002 - 2005 NetGroup, Politecnico di Torino (Italy)
3 | * Copyright (c) 2005 - 2009 CACE Technologies, Inc. Davis (California)
4 | * All rights reserved.
5 | *
6 | * Redistribution and use in source and binary forms, with or without
7 | * modification, are permitted provided that the following conditions
8 | * are met:
9 | *
10 | * 1. Redistributions of source code must retain the above copyright
11 | * notice, this list of conditions and the following disclaimer.
12 | * 2. Redistributions in binary form must reproduce the above copyright
13 | * notice, this list of conditions and the following disclaimer in the
14 | * documentation and/or other materials provided with the distribution.
15 | * 3. Neither the name of the Politecnico di Torino nor the names of its
16 | * contributors may be used to endorse or promote products derived from
17 | * this software without specific prior written permission.
18 | *
19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | *
31 | * @(#) $Header: /tcpdump/master/libpcap/pcap-stdinc.h,v 1.10.2.1 2008-10-06 15:38:39 gianluca Exp $ (LBL)
32 | */
33 |
34 | #define SIZEOF_CHAR 1
35 | #define SIZEOF_SHORT 2
36 | #define SIZEOF_INT 4
37 | #ifndef _MSC_EXTENSIONS
38 | #define SIZEOF_LONG_LONG 8
39 | #endif
40 |
41 | /*
42 | * Avoids a compiler warning in case this was already defined
43 | * (someone defined _WINSOCKAPI_ when including 'windows.h', in order
44 | * to prevent it from including 'winsock.h')
45 | */
46 | #ifdef _WINSOCKAPI_
47 | #undef _WINSOCKAPI_
48 | #endif
49 | #include
50 |
51 | #include
52 |
53 | #include "bittypes.h"
54 | #include
55 | #include
56 |
57 | #ifndef __MINGW32__
58 | #include "IP6_misc.h"
59 | #endif
60 |
61 | #define caddr_t char*
62 |
63 | #if _MSC_VER < 1500
64 | #define snprintf _snprintf
65 | #define vsnprintf _vsnprintf
66 | #define strdup _strdup
67 | #endif
68 |
69 | #define inline __inline
70 |
71 | #ifdef __MINGW32__
72 | #include
73 | #else /*__MINGW32__*/
74 | /* MSVC compiler */
75 | #ifndef _UINTPTR_T_DEFINED
76 | #ifdef _WIN64
77 | typedef unsigned __int64 uintptr_t;
78 | #else
79 | typedef _W64 unsigned int uintptr_t;
80 | #endif
81 | #define _UINTPTR_T_DEFINED
82 | #endif
83 |
84 | #ifndef _INTPTR_T_DEFINED
85 | #ifdef _WIN64
86 | typedef __int64 intptr_t;
87 | #else
88 | typedef _W64 int intptr_t;
89 | #endif
90 | #define _INTPTR_T_DEFINED
91 | #endif
92 |
93 | #endif /*__MINGW32__*/
94 |
--------------------------------------------------------------------------------
/oshw/win32/wpcap/Include/pcap.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 1993, 1994, 1995, 1996, 1997
3 | * The Regents of the University of California. All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without
6 | * modification, are permitted provided that the following conditions
7 | * are met:
8 | * 1. Redistributions of source code must retain the above copyright
9 | * notice, this list of conditions and the following disclaimer.
10 | * 2. Redistributions in binary form must reproduce the above copyright
11 | * notice, this list of conditions and the following disclaimer in the
12 | * documentation and/or other materials provided with the distribution.
13 | * 3. All advertising materials mentioning features or use of this software
14 | * must display the following acknowledgement:
15 | * This product includes software developed by the Computer Systems
16 | * Engineering Group at Lawrence Berkeley Laboratory.
17 | * 4. Neither the name of the University nor of the Laboratory may be used
18 | * to endorse or promote products derived from this software without
19 | * specific prior written permission.
20 | *
21 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 | * SUCH DAMAGE.
32 | *
33 | * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.59 2006/10/04 18:09:22 guy Exp $ (LBL)
34 | */
35 |
36 | /*
37 | * For backwards compatibility.
38 | *
39 | * Note to OS vendors: do NOT get rid of this file! Many applications
40 | * expect to be able to include , and at least some of them
41 | * go through contortions in their configure scripts to try to detect
42 | * OSes that have "helpfully" moved pcap.h to without
43 | * leaving behind a file.
44 | */
45 | #include
46 |
--------------------------------------------------------------------------------
/oshw/win32/wpcap/Include/pcap/bluetooth.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2006 Paolo Abeni (Italy)
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without
6 | * modification, are permitted provided that the following conditions
7 | * are met:
8 | *
9 | * 1. Redistributions of source code must retain the above copyright
10 | * notice, this list of conditions and the following disclaimer.
11 | * 2. Redistributions in binary form must reproduce the above copyright
12 | * notice, this list of conditions and the following disclaimer in the
13 | * documentation and/or other materials provided with the distribution.
14 | * 3. The name of the author may not be used to endorse or promote
15 | * products derived from this software without specific prior written
16 | * permission.
17 | *
18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | *
30 | * bluetooth data struct
31 | * By Paolo Abeni
32 | *
33 | * @(#) $Header: /tcpdump/master/libpcap/pcap/bluetooth.h,v 1.1 2007/09/22 02:10:17 guy Exp $
34 | */
35 |
36 | #ifndef _PCAP_BLUETOOTH_STRUCTS_H__
37 | #define _PCAP_BLUETOOTH_STRUCTS_H__
38 |
39 | /*
40 | * Header prepended libpcap to each bluetooth h:4 frame.
41 | * fields are in network byte order
42 | */
43 | typedef struct _pcap_bluetooth_h4_header {
44 | u_int32_t direction; /* if first bit is set direction is incoming */
45 | } pcap_bluetooth_h4_header;
46 |
47 |
48 | #endif
49 |
--------------------------------------------------------------------------------
/oshw/win32/wpcap/Include/pcap/namedb.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 1994, 1996
3 | * The Regents of the University of California. All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without
6 | * modification, are permitted provided that the following conditions
7 | * are met:
8 | * 1. Redistributions of source code must retain the above copyright
9 | * notice, this list of conditions and the following disclaimer.
10 | * 2. Redistributions in binary form must reproduce the above copyright
11 | * notice, this list of conditions and the following disclaimer in the
12 | * documentation and/or other materials provided with the distribution.
13 | * 3. All advertising materials mentioning features or use of this software
14 | * must display the following acknowledgement:
15 | * This product includes software developed by the Computer Systems
16 | * Engineering Group at Lawrence Berkeley Laboratory.
17 | * 4. Neither the name of the University nor of the Laboratory may be used
18 | * to endorse or promote products derived from this software without
19 | * specific prior written permission.
20 | *
21 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 | * SUCH DAMAGE.
32 | *
33 | * @(#) $Header: /tcpdump/master/libpcap/pcap/namedb.h,v 1.1 2006/10/04 18:09:22 guy Exp $ (LBL)
34 | */
35 |
36 | #ifndef lib_pcap_namedb_h
37 | #define lib_pcap_namedb_h
38 |
39 | #ifdef __cplusplus
40 | extern "C" {
41 | #endif
42 |
43 | /*
44 | * As returned by the pcap_next_etherent()
45 | * XXX this stuff doesn't belong in this interface, but this
46 | * library already must do name to address translation, so
47 | * on systems that don't have support for /etc/ethers, we
48 | * export these hooks since they'll
49 | */
50 | struct pcap_etherent {
51 | u_char addr[6];
52 | char name[122];
53 | };
54 | #ifndef PCAP_ETHERS_FILE
55 | #define PCAP_ETHERS_FILE "/etc/ethers"
56 | #endif
57 | struct pcap_etherent *pcap_next_etherent(FILE *);
58 | u_char *pcap_ether_hostton(const char*);
59 | u_char *pcap_ether_aton(const char *);
60 |
61 | bpf_u_int32 **pcap_nametoaddr(const char *);
62 | #ifdef INET6
63 | struct addrinfo *pcap_nametoaddrinfo(const char *);
64 | #endif
65 | bpf_u_int32 pcap_nametonetaddr(const char *);
66 |
67 | int pcap_nametoport(const char *, int *, int *);
68 | int pcap_nametoportrange(const char *, int *, int *, int *);
69 | int pcap_nametoproto(const char *);
70 | int pcap_nametoeproto(const char *);
71 | int pcap_nametollc(const char *);
72 | /*
73 | * If a protocol is unknown, PROTO_UNDEF is returned.
74 | * Also, pcap_nametoport() returns the protocol along with the port number.
75 | * If there are ambiguous entried in /etc/services (i.e. domain
76 | * can be either tcp or udp) PROTO_UNDEF is returned.
77 | */
78 | #define PROTO_UNDEF -1
79 |
80 | /* XXX move these to pcap-int.h? */
81 | int __pcap_atodn(const char *, bpf_u_int32 *);
82 | int __pcap_atoin(const char *, bpf_u_int32 *);
83 | u_short __pcap_nametodnaddr(const char *);
84 |
85 | #ifdef __cplusplus
86 | }
87 | #endif
88 |
89 | #endif
90 |
--------------------------------------------------------------------------------
/oshw/win32/wpcap/Include/pcap/usb.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2006 Paolo Abeni (Italy)
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without
6 | * modification, are permitted provided that the following conditions
7 | * are met:
8 | *
9 | * 1. Redistributions of source code must retain the above copyright
10 | * notice, this list of conditions and the following disclaimer.
11 | * 2. Redistributions in binary form must reproduce the above copyright
12 | * notice, this list of conditions and the following disclaimer in the
13 | * documentation and/or other materials provided with the distribution.
14 | * 3. The name of the author may not be used to endorse or promote
15 | * products derived from this software without specific prior written
16 | * permission.
17 | *
18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | *
30 | * Basic USB data struct
31 | * By Paolo Abeni
32 | *
33 | * @(#) $Header: /tcpdump/master/libpcap/pcap/usb.h,v 1.6 2007/09/22 02:06:08 guy Exp $
34 | */
35 |
36 | #ifndef _PCAP_USB_STRUCTS_H__
37 | #define _PCAP_USB_STRUCTS_H__
38 |
39 | /*
40 | * possible transfer mode
41 | */
42 | #define URB_TRANSFER_IN 0x80
43 | #define URB_ISOCHRONOUS 0x0
44 | #define URB_INTERRUPT 0x1
45 | #define URB_CONTROL 0x2
46 | #define URB_BULK 0x3
47 |
48 | /*
49 | * possible event type
50 | */
51 | #define URB_SUBMIT 'S'
52 | #define URB_COMPLETE 'C'
53 | #define URB_ERROR 'E'
54 |
55 | /*
56 | * USB setup header as defined in USB specification.
57 | * Appears at the front of each packet in DLT_USB captures.
58 | */
59 | typedef struct _usb_setup {
60 | u_int8_t bmRequestType;
61 | u_int8_t bRequest;
62 | u_int16_t wValue;
63 | u_int16_t wIndex;
64 | u_int16_t wLength;
65 | } pcap_usb_setup;
66 |
67 |
68 | /*
69 | * Header prepended by linux kernel to each event.
70 | * Appears at the front of each packet in DLT_USB_LINUX captures.
71 | */
72 | typedef struct _usb_header {
73 | u_int64_t id;
74 | u_int8_t event_type;
75 | u_int8_t transfer_type;
76 | u_int8_t endpoint_number;
77 | u_int8_t device_address;
78 | u_int16_t bus_id;
79 | char setup_flag;/*if !=0 the urb setup header is not present*/
80 | char data_flag; /*if !=0 no urb data is present*/
81 | int64_t ts_sec;
82 | int32_t ts_usec;
83 | int32_t status;
84 | u_int32_t urb_len;
85 | u_int32_t data_len; /* amount of urb data really present in this event*/
86 | pcap_usb_setup setup;
87 | } pcap_usb_header;
88 |
89 |
90 | #endif
91 |
--------------------------------------------------------------------------------
/oshw/win32/wpcap/Include/pcap/vlan.h:
--------------------------------------------------------------------------------
1 | /*-
2 | * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
3 | * The Regents of the University of California. All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without
6 | * modification, are permitted provided that the following conditions
7 | * are met:
8 | * 1. Redistributions of source code must retain the above copyright
9 | * notice, this list of conditions and the following disclaimer.
10 | * 2. Redistributions in binary form must reproduce the above copyright
11 | * notice, this list of conditions and the following disclaimer in the
12 | * documentation and/or other materials provided with the distribution.
13 | * 3. All advertising materials mentioning features or use of this software
14 | * must display the following acknowledgement:
15 | * This product includes software developed by the University of
16 | * California, Berkeley and its contributors.
17 | * 4. Neither the name of the University nor the names of its contributors
18 | * may be used to endorse or promote products derived from this software
19 | * without specific prior written permission.
20 | *
21 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 | * SUCH DAMAGE.
32 | *
33 | * @(#) $Header: /tcpdump/master/libpcap/pcap/vlan.h,v 1.1.2.2 2008-08-06 07:45:59 guy Exp $
34 | */
35 |
36 | #ifndef lib_pcap_vlan_h
37 | #define lib_pcap_vlan_h
38 |
39 | struct vlan_tag {
40 | u_int16_t vlan_tpid; /* ETH_P_8021Q */
41 | u_int16_t vlan_tci; /* VLAN TCI */
42 | };
43 |
44 | #define VLAN_TAG_LEN 4
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/oshw/win32/wpcap/Lib/Packet.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/oshw/win32/wpcap/Lib/Packet.lib
--------------------------------------------------------------------------------
/oshw/win32/wpcap/Lib/libpacket.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/oshw/win32/wpcap/Lib/libpacket.a
--------------------------------------------------------------------------------
/oshw/win32/wpcap/Lib/libwpcap.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/oshw/win32/wpcap/Lib/libwpcap.a
--------------------------------------------------------------------------------
/oshw/win32/wpcap/Lib/wpcap.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/oshw/win32/wpcap/Lib/wpcap.lib
--------------------------------------------------------------------------------
/oshw/win32/wpcap/Lib/x64/Packet.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/oshw/win32/wpcap/Lib/x64/Packet.lib
--------------------------------------------------------------------------------
/oshw/win32/wpcap/Lib/x64/wpcap.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/oshw/win32/wpcap/Lib/x64/wpcap.lib
--------------------------------------------------------------------------------
/soem/ethercatconfig.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Simple Open EtherCAT Master Library
3 | *
4 | * File : ethercatconfig.h
5 | * Version : 1.3.1
6 | * Date : 11-03-2015
7 | * Copyright (C) 2005-2015 Speciaal Machinefabriek Ketels v.o.f.
8 | * Copyright (C) 2005-2015 Arthur Ketels
9 | * Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven
10 | * Copyright (C) 2014-2015 rt-labs AB , Sweden
11 | *
12 | * SOEM is free software; you can redistribute it and/or modify it under
13 | * the terms of the GNU General Public License version 2 as published by the Free
14 | * Software Foundation.
15 | *
16 | * SOEM is distributed in the hope that it will be useful, but WITHOUT ANY
17 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 | * for more details.
20 | *
21 | * As a special exception, if other files instantiate templates or use macros
22 | * or inline functions from this file, or you compile this file and link it
23 | * with other works to produce a work based on this file, this file does not
24 | * by itself cause the resulting work to be covered by the GNU General Public
25 | * License. However the source code for this file must still be made available
26 | * in accordance with section (3) of the GNU General Public License.
27 | *
28 | * This exception does not invalidate any other reasons why a work based on
29 | * this file might be covered by the GNU General Public License.
30 | *
31 | * The EtherCAT Technology, the trade name and logo “EtherCAT” are the intellectual
32 | * property of, and protected by Beckhoff Automation GmbH. You can use SOEM for
33 | * the sole purpose of creating, using and/or selling or otherwise distributing
34 | * an EtherCAT network master provided that an EtherCAT Master License is obtained
35 | * from Beckhoff Automation GmbH.
36 | *
37 | * In case you did not receive a copy of the EtherCAT Master License along with
38 | * SOEM write to Beckhoff Automation GmbH, Eiserstraße 5, D-33415 Verl, Germany
39 | * (www.beckhoff.com).
40 | */
41 |
42 | /** \file
43 | * \brief
44 | * Headerfile for ethercatconfig.c
45 | */
46 |
47 | #ifndef _ethercatconfig_
48 | #define _ethercatconfig_
49 |
50 | #ifdef __cplusplus
51 | extern "C"
52 | {
53 | #endif
54 |
55 | #define EC_NODEOFFSET 0x1000
56 | #define EC_TEMPNODE 0xffff
57 |
58 | #ifdef EC_VER1
59 | int ec_config_init(uint8 usetable);
60 | int ec_config_map(void *pIOmap);
61 | int ec_config_map_group(void *pIOmap, uint8 group);
62 | int ec_config(uint8 usetable, void *pIOmap);
63 | int ec_recover_slave(uint16 slave, int timeout);
64 | int ec_reconfig_slave(uint16 slave, int timeout);
65 | #endif
66 |
67 | int ecx_config_init(ecx_contextt *context, uint8 usetable);
68 | int ecx_config_map_group(ecx_contextt *context, void *pIOmap, uint8 group);
69 | int ecx_recover_slave(ecx_contextt *context, uint16 slave, int timeout);
70 | int ecx_reconfig_slave(ecx_contextt *context, uint16 slave, int timeout);
71 |
72 | #ifdef __cplusplus
73 | }
74 | #endif
75 |
76 | #endif
77 |
--------------------------------------------------------------------------------
/soem/ethercatdc.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Simple Open EtherCAT Master Library
3 | *
4 | * File : ethercatdc.h
5 | * Version : 1.3.1
6 | * Date : 11-03-2015
7 | * Copyright (C) 2005-2015 Speciaal Machinefabriek Ketels v.o.f.
8 | * Copyright (C) 2005-2015 Arthur Ketels
9 | * Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven
10 | * Copyright (C) 2014-2015 rt-labs AB , Sweden
11 | *
12 | * SOEM is free software; you can redistribute it and/or modify it under
13 | * the terms of the GNU General Public License version 2 as published by the Free
14 | * Software Foundation.
15 | *
16 | * SOEM is distributed in the hope that it will be useful, but WITHOUT ANY
17 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 | * for more details.
20 | *
21 | * As a special exception, if other files instantiate templates or use macros
22 | * or inline functions from this file, or you compile this file and link it
23 | * with other works to produce a work based on this file, this file does not
24 | * by itself cause the resulting work to be covered by the GNU General Public
25 | * License. However the source code for this file must still be made available
26 | * in accordance with section (3) of the GNU General Public License.
27 | *
28 | * This exception does not invalidate any other reasons why a work based on
29 | * this file might be covered by the GNU General Public License.
30 | *
31 | * The EtherCAT Technology, the trade name and logo “EtherCAT” are the intellectual
32 | * property of, and protected by Beckhoff Automation GmbH. You can use SOEM for
33 | * the sole purpose of creating, using and/or selling or otherwise distributing
34 | * an EtherCAT network master provided that an EtherCAT Master License is obtained
35 | * from Beckhoff Automation GmbH.
36 | *
37 | * In case you did not receive a copy of the EtherCAT Master License along with
38 | * SOEM write to Beckhoff Automation GmbH, Eiserstraße 5, D-33415 Verl, Germany
39 | * (www.beckhoff.com).
40 | */
41 |
42 | /** \file
43 | * \brief
44 | * Headerfile for ethercatdc.c
45 | */
46 |
47 | #ifndef _EC_ECATDC_H
48 | #define _EC_ECATDC_H
49 |
50 | #ifdef __cplusplus
51 | extern "C"
52 | {
53 | #endif
54 |
55 | #ifdef EC_VER1
56 | boolean ec_configdc();
57 | void ec_dcsync0(uint16 slave, boolean act, uint32 CyclTime, uint32 CyclShift);
58 | void ec_dcsync01(uint16 slave, boolean act, uint32 CyclTime0, uint32 CyclTime1, uint32 CyclShift);
59 | #endif
60 |
61 | boolean ecx_configdc(ecx_contextt *context);
62 | void ecx_dcsync0(ecx_contextt *context, uint16 slave, boolean act, uint32 CyclTime, uint32 CyclShift);
63 | void ecx_dcsync01(ecx_contextt *context, uint16 slave, boolean act, uint32 CyclTime0, uint32 CyclTime1, uint32 CyclShift);
64 |
65 | #ifdef __cplusplus
66 | }
67 | #endif
68 |
69 | #endif /* _EC_ECATDC_H */
70 |
--------------------------------------------------------------------------------
/soem/ethercatfoe.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Simple Open EtherCAT Master Library
3 | *
4 | * File : ethercatfoe.h
5 | * Version : 1.3.1
6 | * Date : 11-03-2015
7 | * Copyright (C) 2005-2015 Speciaal Machinefabriek Ketels v.o.f.
8 | * Copyright (C) 2005-2015 Arthur Ketels
9 | * Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven
10 | * Copyright (C) 2014-2015 rt-labs AB , Sweden
11 | *
12 | * SOEM is free software; you can redistribute it and/or modify it under
13 | * the terms of the GNU General Public License version 2 as published by the Free
14 | * Software Foundation.
15 | *
16 | * SOEM is distributed in the hope that it will be useful, but WITHOUT ANY
17 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 | * for more details.
20 | *
21 | * As a special exception, if other files instantiate templates or use macros
22 | * or inline functions from this file, or you compile this file and link it
23 | * with other works to produce a work based on this file, this file does not
24 | * by itself cause the resulting work to be covered by the GNU General Public
25 | * License. However the source code for this file must still be made available
26 | * in accordance with section (3) of the GNU General Public License.
27 | *
28 | * This exception does not invalidate any other reasons why a work based on
29 | * this file might be covered by the GNU General Public License.
30 | *
31 | * The EtherCAT Technology, the trade name and logo “EtherCAT” are the intellectual
32 | * property of, and protected by Beckhoff Automation GmbH. You can use SOEM for
33 | * the sole purpose of creating, using and/or selling or otherwise distributing
34 | * an EtherCAT network master provided that an EtherCAT Master License is obtained
35 | * from Beckhoff Automation GmbH.
36 | *
37 | * In case you did not receive a copy of the EtherCAT Master License along with
38 | * SOEM write to Beckhoff Automation GmbH, Eiserstraße 5, D-33415 Verl, Germany
39 | * (www.beckhoff.com).
40 | */
41 |
42 | /** \file
43 | * \brief
44 | * Headerfile for ethercatfoe.c
45 | */
46 |
47 | #ifndef _ethercatfoe_
48 | #define _ethercatfoe_
49 |
50 | #ifdef __cplusplus
51 | extern "C"
52 | {
53 | #endif
54 |
55 | #ifdef EC_VER1
56 | int ec_FOEdefinehook(void *hook);
57 | int ec_FOEread(uint16 slave, char *filename, uint32 password, int *psize, void *p, int timeout);
58 | int ec_FOEwrite(uint16 slave, char *filename, uint32 password, int psize, void *p, int timeout);
59 | #endif
60 |
61 | int ecx_FOEdefinehook(ecx_contextt *context, void *hook);
62 | int ecx_FOEread(ecx_contextt *context, uint16 slave, char *filename, uint32 password, int *psize, void *p, int timeout);
63 | int ecx_FOEwrite(ecx_contextt *context, uint16 slave, char *filename, uint32 password, int psize, void *p, int timeout);
64 |
65 | #ifdef __cplusplus
66 | }
67 | #endif
68 |
69 | #endif
70 |
--------------------------------------------------------------------------------
/soem/ethercatmain.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/soem/ethercatmain.h
--------------------------------------------------------------------------------
/soem/ethercatprint.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Simple Open EtherCAT Master Library
3 | *
4 | * File : ethercatprint.h
5 | * Version : 1.3.1
6 | * Date : 11-03-2015
7 | * Copyright (C) 2005-2015 Speciaal Machinefabriek Ketels v.o.f.
8 | * Copyright (C) 2005-2015 Arthur Ketels
9 | * Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven
10 | * Copyright (C) 2014-2015 rt-labs AB , Sweden
11 | *
12 | * SOEM is free software; you can redistribute it and/or modify it under
13 | * the terms of the GNU General Public License version 2 as published by the Free
14 | * Software Foundation.
15 | *
16 | * SOEM is distributed in the hope that it will be useful, but WITHOUT ANY
17 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 | * for more details.
20 | *
21 | * As a special exception, if other files instantiate templates or use macros
22 | * or inline functions from this file, or you compile this file and link it
23 | * with other works to produce a work based on this file, this file does not
24 | * by itself cause the resulting work to be covered by the GNU General Public
25 | * License. However the source code for this file must still be made available
26 | * in accordance with section (3) of the GNU General Public License.
27 | *
28 | * This exception does not invalidate any other reasons why a work based on
29 | * this file might be covered by the GNU General Public License.
30 | *
31 | * The EtherCAT Technology, the trade name and logo “EtherCAT” are the intellectual
32 | * property of, and protected by Beckhoff Automation GmbH. You can use SOEM for
33 | * the sole purpose of creating, using and/or selling or otherwise distributing
34 | * an EtherCAT network master provided that an EtherCAT Master License is obtained
35 | * from Beckhoff Automation GmbH.
36 | *
37 | * In case you did not receive a copy of the EtherCAT Master License along with
38 | * SOEM write to Beckhoff Automation GmbH, Eiserstraße 5, D-33415 Verl, Germany
39 | * (www.beckhoff.com).
40 | */
41 |
42 | /** \file
43 | * \brief
44 | * Headerfile for ethercatprint.c
45 | */
46 |
47 | #ifndef _ethercatprint_
48 | #define _ethercatprint_
49 |
50 | #ifdef __cplusplus
51 | extern "C"
52 | {
53 | #endif
54 |
55 | char* ec_sdoerror2string( uint16 sdoerrorcode);
56 | char* ec_ALstatuscode2string( uint16 ALstatuscode);
57 | char* ec_soeerror2string( uint16 errorcode);
58 | char* ecx_elist2string(ecx_contextt *context);
59 |
60 | #ifdef EC_VER1
61 | char* ec_elist2string(void);
62 | #endif
63 |
64 | #ifdef __cplusplus
65 | }
66 | #endif
67 |
68 | #endif
69 |
--------------------------------------------------------------------------------
/test/.late:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethercat-diy/stm32f4_ethercat/36acedde0b6b948a5887596239ca4599390cf87f/test/.late
--------------------------------------------------------------------------------
/test/linux/eepromtool/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | set(SOURCES eepromtool.c)
3 | add_executable(eepromtool ${SOURCES})
4 | target_link_libraries(eepromtool soem)
5 |
6 | if(WIN32)
7 | target_link_libraries(eepromtool wpcap.lib Packet.lib Ws2_32.lib Winmm.lib)
8 | elseif(UNIX)
9 | target_link_libraries(eepromtool pthread rt)
10 | endif()
11 |
12 | install(TARGETS eepromtool DESTINATION bin)
13 |
--------------------------------------------------------------------------------
/test/linux/simple_test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | set(SOURCES simple_test.c)
3 | add_executable(simple_test ${SOURCES})
4 | target_link_libraries(simple_test soem)
5 |
6 | if(WIN32)
7 | target_link_libraries(simple_test wpcap.lib Packet.lib Ws2_32.lib Winmm.lib)
8 | elseif(UNIX)
9 | target_link_libraries(simple_test pthread rt)
10 | endif()
11 |
12 | install(TARGETS simple_test DESTINATION bin)
13 |
--------------------------------------------------------------------------------
/test/linux/slaveinfo/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | set(SOURCES slaveinfo.c)
3 | add_executable(slaveinfo ${SOURCES})
4 | target_link_libraries(slaveinfo soem)
5 |
6 | if(WIN32)
7 | target_link_libraries(slaveinfo wpcap.lib Packet.lib Ws2_32.lib Winmm.lib)
8 | elseif(UNIX)
9 | target_link_libraries(slaveinfo pthread rt)
10 | elseif(${CMAKE_SYSTEM_NAME} MATCHES "rt-kernel")
11 | target_link_libraries(slaveinfo "-Wl,--start-group -l${BSP} -l${ARCH} -lkern -ldev -lsio -lblock -lfs -lusb -llwip -leth -li2c -lrtc -lcan -lnand -lspi -lnor -lpwm -ladc -ltrace -lc -lm -Wl,--end-group")
12 | endif()
13 |
14 | install(TARGETS slaveinfo DESTINATION bin)
15 |
--------------------------------------------------------------------------------
/test/rtk/schedule.tt:
--------------------------------------------------------------------------------
1 | stack_size: 2048
2 |
3 | tasks:
4 | - name : tReadIO
5 | entry : read_io
6 | arg : 'NULL'
7 |
8 | schedules:
9 | - name : sched1
10 | period : 1
11 | events :
12 | - task : tReadIO
13 | start : 0
14 | stop : 1
--------------------------------------------------------------------------------