Go to the documentation of this file.
35 #include <sys/types.h>
46 #include "intel_i210.h"
47 #include "ee_x86_64_tsc.h"
70 #define RX_PRIM priMAC[1]
72 #define RX_SEC secMAC[1]
93 struct eth_device *dev;
94 OSEE_PRINT(
"ecx_setupnic() searching %s...\n", ifname);
97 dev = eth_get_device(d);
102 if (!strncmp(dev->name, ifname, MAX_DEVICE_NAME)){
106 eth_setup_device(d, 1, 100);
133 return (dev != NULL);
221 stack = &(port->
stack);
227 eth_send_packet(port->
dev_id, (*stack->
txbuf)[idx], lp, 1);
254 datagramP->index = idx;
277 stack = &(port->
stack);
281 bytesrx = eth_receive_packet(port->
dev_id, (*stack->
tempbuf), lp, 1, 0);
284 return (bytesrx > 0);
314 stack = &(port->
stack);
321 l = (*rxbuf)[0] + ((
uint16)((*
rxbuf)[1] & 0x0f) << 8);
323 rval = ((*rxbuf)[l] + ((
uint16)(*
rxbuf)[l + 1] << 8));
338 l =
etohs(ecp->elength) & 0x0fff;
345 rval = ((*rxbuf)[l] + ((
uint16)((*
rxbuf)[l + 1]) << 8));
360 OSEE_PRINT(
"ecx_inframe(): WARNING: strange things happened\n");
364 OSEE_PRINT(
"ecx_inframe(): WARNING it is NOT an EtherCAT frame!\n");
432 if ( ((primrx == 0) && (secrx ==
RX_SEC)) ||
547 int ec_inframe(
int idx,
int stacknumber)
uint8 ec_bufT[EC_BUFSIZE]
int ec_waitinframe(int idx, int timeout)
int ec_setupnic(const char *ifname, int secondary)
int txbuflength[EC_MAXBUF]
void ec_setbufstat(int idx, int bufstat)
void ee_port_unlock(void)
boolean osal_timer_is_expired(osal_timert *self)
int ec_outframe(int idx, int sock)
uint16 oshw_htons(uint16 host)
int ecx_getindex(ecx_portt *port)
int ecx_outframe(ecx_portt *port, int idx, int stacknumber)
int ecx_closenic(ecx_portt *port)
int ec_srconfirm(int idx, int timeout)
static void ecx_clear_rxbufstat(int *rxbufstat)
int ec_outframe_red(int idx)
PACKED_BEGIN struct PACKED ec_comt
static int ecx_waitinframe_red(ecx_portt *port, int idx, osal_timert *timer)
int(* txbuflength)[EC_MAXBUF]
ec_bufT(* rxbuf)[EC_MAXBUF]
static int ecx_recvpkt(ecx_portt *port, int stacknumber)
Headerfile for ethercatbase.c.
void osal_timer_start(osal_timert *self, uint32 timeout_usec)
uint16 oshw_ntohs(uint16 network)
int ecx_setupnic(ecx_portt *port, const char *ifname, int secondary)
ec_bufT(* txbuf)[EC_MAXBUF]
int ecx_waitinframe(ecx_portt *port, int idx, int timeout)
PACKED_BEGIN struct PACKED ec_etherheadert
int ecx_outframe_red(ecx_portt *port, int idx)
void ecx_setbufstat(ecx_portt *port, int idx, int bufstat)
int ecx_inframe(ecx_portt *port, int idx, int stacknumber)
void ec_setupheader(void *p)
int(* rxbufstat)[EC_MAXBUF]
int ecx_srconfirm(ecx_portt *port, int idx, int timeout)
soem
Author(s): Arthur Ketels and M.J.G. van den Molengraft
autogenerated on Wed Mar 2 2022 01:01:49