libethercat - an embeddable realtime EtherCAT-master library
Communicate with EtherCAT slaves attached to a Network interface.
Loading...
Searching...
No Matches
regs.h
1
12/*
13 * This file is part of libethercat.
14 *
15 * libethercat is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Lesser General Public
17 * License as published by the Free Software Foundation; either
18 * version 3 of the License, or (at your option) any later version.
19 *
20 * libethercat is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Lesser General Public License for more details.
24 *
25 * You should have received a copy of the GNU Lesser General Public
26 * License along with libethercat (LICENSE.LGPL-V3); if not, write
27 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
28 * Floor, Boston, MA 02110-1301, USA.
29 *
30 * Please note that the use of the EtherCAT technology, the EtherCAT
31 * brand name and the EtherCAT logo is only permitted if the property
32 * rights of Beckhoff Automation GmbH are observed. For further
33 * information please contact Beckhoff Automation GmbH & Co. KG,
34 * Hülshorstweg 20, D-33415 Verl, Germany (www.beckhoff.com) or the
35 * EtherCAT Technology Group, Ostendstraße 196, D-90482 Nuremberg,
36 * Germany (ETG, www.ethercat.org).
37 *
38 */
39
40#ifndef LIBETHERCAT_REGS_H
41#define LIBETHERCAT_REGS_H
42
43#include <libosal/types.h>
44
55enum {
56 EC_CMD_NOP = 0x00,
57 EC_CMD_APRD = 0x01,
58 EC_CMD_APWR = 0x02,
59 EC_CMD_APRW = 0x03,
60 EC_CMD_FPRD = 0x04,
61 EC_CMD_FPWR = 0x05,
62 EC_CMD_FPRW = 0x06,
63 EC_CMD_BRD = 0x07,
64 EC_CMD_BWR = 0x08,
65 EC_CMD_BRW = 0x09,
66 EC_CMD_LRD = 0x0A,
67 EC_CMD_LWR = 0x0B,
68 EC_CMD_LRW = 0x0C,
69 EC_CMD_ARMW = 0x0D,
70 EC_CMD_FRMW = 0x0E
71};
72
73#define EC_REG_TYPE (0x0000u)
74#define EC_REG_SM_FFMU_CH (0x0004u)
75#define EC_REG_FMMU_CH (0x0004u)
76#define EC_REG_SM_CH (0x0005u)
77#define EC_REG_RAM_SIZE (0x0006u)
78#define EC_REG_PORTDES (0x0007u)
79#define EC_REG_ESCSUP (0x0008u)
80
81#define EC_REG_ESCSUP__FMMU_BIT_OP_NOT_SUPP (0x0001u)
82#define EC_REG_ESCSUP__NO_SUPP_RESERVED_REG (0x0002u)
83#define EC_REG_ESCSUP__DC_SUPP (0x0004u)
84#define EC_REG_ESCSUP__DC_RANGE (0x0008u)
85#define EC_REG_ESCSUP__LOW_J_EBUS (0x0010u)
86#define EC_REG_ESCSUP__ENH_LD_EBUS (0x0020u)
87#define EC_REG_ESCSUP__ENH_LD_MII (0x0040u)
88#define EC_REG_ESCSUP__FCS_S_ERR (0x0080u)
89#define EC_REG_ESCSUP__ENHANCED_DC_SYNC_ACT (0x0100u)
90#define EC_REG_ESCSUP__NOT_SUPP_LRW (0x0200u)
91#define EC_REG_ESCSUP__NOT_SUPP_BAFRW (0x0400u)
92#define EC_REG_ESCSUP__S_FMMU_SYMC (0x0800u)
93
94#define EC_REG_STADR (0x0010u)
95#define EC_REG_ALIAS (0x0012u)
96#define EC_REG_DLCTL (0x0100u)
97#define EC_REG_DLPORT (0x0101u)
98#define EC_REG_DLALIAS (0x0103u)
99#define EC_REG_DLSTAT (0x0110u)
100#define EC_REG_ALCTL (0x0120u)
101#define EC_REG_ALSTAT (0x0130u)
102#define EC_REG_ALSTATCODE (0x0134u)
103#define EC_REG_PDICTL (0x0140u)
104#define EC_REG_IRQMASK (0x0200u)
105#define EC_REG_RXERR (0x0300u)
106#define EC_REG_EEPCFG (0x0500u)
107#define EC_REG_EEPCTL (0x0502u)
108#define EC_REG_EEPSTAT (0x0502u)
109#define EC_REG_EEPADR (0x0504u)
110#define EC_REG_EEPDAT (0x0508u)
111#define EC_REG_MII_CTRLSTAT (0x0510u)
112#define EC_REG_MII_PHY_ADR (0x0512u)
113#define EC_REG_MII_PHY_REG (0x0513u)
114#define EC_REG_MII_PHY_DATA (0x0514u)
115#define EC_REG_MII_ECAT_ACC (0x0516u)
116#define EC_REG_MII_PDI_ACC (0x0517u)
117#define EC_REG_MII_PHY0_ST (0x0518u)
118#define EC_REG_MII_PHY1_ST (0x0519u)
119#define EC_REG_MII_PHY2_ST (0x051Au)
120#define EC_REG_MII_PHY3_ST (0x051Bu)
121#define EC_REG_FMMU0 (0x0600u)
122#define EC_REG_FMMU1 (EC_REG_FMMU0 + 0x10u)
123#define EC_REG_FMMU2 (EC_REG_FMMU1 + 0x10u)
124#define EC_REG_FMMU3 (EC_REG_FMMU2 + 0x10u)
125#define EC_REG_SM0 (0x0800u)
126#define EC_REG_SM1 (EC_REG_SM0 + 0x08u)
127#define EC_REG_SM2 (EC_REG_SM1 + 0x08u)
128#define EC_REG_SM3 (EC_REG_SM2 + 0x08u)
129#define EC_REG_SM0STAT (EC_REG_SM0 + 0x05u)
130#define EC_REG_SM0ACT (EC_REG_SM0 + 0x06u)
131#define EC_REG_SM0CONTR (EC_REG_SM0 + 0x07u)
132#define EC_REG_SM1STAT (EC_REG_SM1 + 0x05u)
133#define EC_REG_SM1ACT (EC_REG_SM1 + 0x06u)
134#define EC_REG_SM1CONTR (EC_REG_SM1 + 0x07u)
135#define EC_REG_DCTIME0 (0x0900u)
136#define EC_REG_DCTIME1 (0x0904u)
137#define EC_REG_DCTIME2 (0x0908u)
138#define EC_REG_DCTIME3 (0x090Cu)
139#define EC_REG_DCSYSTIME (0x0910u)
140#define EC_REG_DCSOF (0x0918u)
141#define EC_REG_DCSYSOFFSET (0x0920u)
142#define EC_REG_DCSYSDELAY (0x0928u)
143#define EC_REG_DCSYSDIFF (0x092Cu)
144#define EC_REG_DCSPEEDCNT (0x0930u)
145#define EC_REG_DCTIMEFILT (0x0934u)
146#define EC_REG_DCCUC (0x0980u)
147#define EC_REG_DCSYNCACT (0x0981u)
148#define EC_REG_DCSTART0 (0x0990u)
149#define EC_REG_DCCYCLE0 (0x09A0u)
150#define EC_REG_DCCYCLE1 (0x09A4u)
151
152typedef struct ec_reg_dl_status
153{
154 osal_uint16_t pdi_operational : 1;
155 osal_uint16_t dls_user_watchdog_tatus : 1;
156 osal_uint16_t extended_link_detection : 1;
157 osal_uint16_t reserved_1 : 1;
158 osal_uint16_t link_status_port_0 : 1;
159 osal_uint16_t link_status_port_1 : 1;
160 osal_uint16_t link_status_port_2 : 1;
161 osal_uint16_t link_status_port_3 : 1;
162 osal_uint16_t loop_status_port_0 : 1;
163 osal_uint16_t signal_detection_port_0 : 1;
164 osal_uint16_t loop_status_port_1 : 1;
165 osal_uint16_t signal_detection_port_1 : 1;
166 osal_uint16_t loop_status_port_2 : 1;
167 osal_uint16_t signal_detection_port_2 : 1;
168 osal_uint16_t loop_status_port_3 : 1;
169 osal_uint16_t signal_detection_port_3 : 1;
171
174#endif // LIBETHERCAT_REGS_H
175
struct ec_reg_dl_status ec_reg_dl_status_t
DL status register type.
@ EC_CMD_LRD
logical memory read
Definition regs.h:66
@ EC_CMD_BRW
broadcast read write
Definition regs.h:65
@ EC_CMD_APWR
auto increment write
Definition regs.h:58
@ EC_CMD_FRMW
configured read mulitple write
Definition regs.h:70
@ EC_CMD_ARMW
auto increment read mulitple write
Definition regs.h:69
@ EC_CMD_BRD
broadcast read
Definition regs.h:63
@ EC_CMD_LRW
logical memory read write
Definition regs.h:68
@ EC_CMD_FPRW
configured address read write
Definition regs.h:62
@ EC_CMD_LWR
logical memory write
Definition regs.h:67
@ EC_CMD_APRW
auto increment read write
Definition regs.h:59
@ EC_CMD_BWR
broaddcast write
Definition regs.h:64
@ EC_CMD_NOP
no op
Definition regs.h:56
@ EC_CMD_FPWR
configured address write
Definition regs.h:61
@ EC_CMD_APRD
auto increment read
Definition regs.h:57
@ EC_CMD_FPRD
configured address read
Definition regs.h:60
Definition regs.h:153
osal_uint16_t link_status_port_2
Link status of port 2.
Definition regs.h:160
osal_uint16_t extended_link_detection
Extended link detection flag.
Definition regs.h:156
osal_uint16_t pdi_operational
PDI operational.
Definition regs.h:154
osal_uint16_t signal_detection_port_0
Signal detected on port 0.
Definition regs.h:163
osal_uint16_t link_status_port_3
Link status of port 3.
Definition regs.h:161
osal_uint16_t dls_user_watchdog_tatus
DLS user watchdog status.
Definition regs.h:155
osal_uint16_t loop_status_port_2
Loop status of port 2.
Definition regs.h:166
osal_uint16_t loop_status_port_1
Loop status of port 1.
Definition regs.h:164
osal_uint16_t loop_status_port_3
Loop status of port 3.
Definition regs.h:168
osal_uint16_t signal_detection_port_1
Signal detected on port 1.
Definition regs.h:165
osal_uint16_t signal_detection_port_2
Signal detected on port 2.
Definition regs.h:167
osal_uint16_t reserved_1
for future use.
Definition regs.h:157
osal_uint16_t link_status_port_0
Link status of port 0.
Definition regs.h:158
osal_uint16_t link_status_port_1
Link status of port 1.
Definition regs.h:159
osal_uint16_t signal_detection_port_3
Signal detected on port 3.
Definition regs.h:169
osal_uint16_t loop_status_port_0
Loop status of port 0.
Definition regs.h:162