libethercat - an embeddable realtime EtherCAT-master library
Communicate with EtherCAT slaves attached to a Network interface.
Loading...
Searching...
No Matches
hw_pikeos.h
Go to the documentation of this file.
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_HW_PIKEOS_H
41#define LIBETHERCAT_HW_PIKEOS_H
42
43#include <libethercat/hw.h>
44
45typedef struct hw_pikeos {
46 struct hw_common common;
47
48 osal_bool_t use_sbuf;
49
50 vm_file_desc_t fd;
51 drv_sbuf_desc_t sbuf;
52
53 osal_uint8_t send_frame[ETH_FRAME_LEN];
54 osal_uint8_t recv_frame[ETH_FRAME_LEN];
55
56 // receiver thread
57 osal_task_t rxthread;
60
61#ifdef __cplusplus
62extern "C" {
63#endif
64
66
75int hw_device_pikeos_open(struct hw_pikeos *phw, ec_t *pec, const osal_char_t *devname,
76 int prio, int cpumask);
77
78#ifdef __cplusplus
79}
80#endif
81
82#endif // LIBETHERCAT_HW_PIKEOS_H
83
84
hardware access functions
int hw_device_pikeos_open(struct hw_pikeos *phw, ec_t *pec, const osal_char_t *devname, int prio, int cpumask)
Opens EtherCAT hw device.
ethercat master structure
Definition ec.h:188
hardware structure
Definition hw.h:123
struct ec * pec
Pointer to EtherCAT master structure.
Definition hw.h:124
Definition hw_pikeos.h:45
drv_sbuf_desc_t sbuf
Driver SBUF descriptor.
Definition hw_pikeos.h:51
osal_uint8_t send_frame[ETH_FRAME_LEN]
Static send frame.
Definition hw_pikeos.h:53
int rxthreadrunning
receiver thread running flag
Definition hw_pikeos.h:58
vm_file_desc_t fd
Driver file descriptor.
Definition hw_pikeos.h:50
osal_task_t rxthread
receiver thread handle
Definition hw_pikeos.h:57
osal_uint8_t recv_frame[ETH_FRAME_LEN]
Static receive frame.
Definition hw_pikeos.h:54