IgH EtherCAT Master  1.6.9
debug.h
Go to the documentation of this file.
1/*****************************************************************************
2 *
3 * Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
4 *
5 * This file is part of the IgH EtherCAT Master.
6 *
7 * The IgH EtherCAT Master is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License version 2, as
9 * published by the Free Software Foundation.
10 *
11 * The IgH EtherCAT Master is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
14 * Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with the IgH EtherCAT Master; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 ****************************************************************************/
21
26
27/****************************************************************************/
28
29#ifndef __EC_DEBUG_H__
30#define __EC_DEBUG_H__
31
32#include "../devices/ecdev.h"
33
34/****************************************************************************/
35
38typedef struct
39{
41 struct net_device *dev;
42 struct net_device_stats stats;
43 uint8_t registered;
44 uint8_t opened;
45}
47
48/****************************************************************************/
49
50int ec_debug_init(ec_debug_t *, ec_device_t *, const char *);
52void ec_debug_register(ec_debug_t *, const struct net_device *);
54void ec_debug_send(ec_debug_t *, const uint8_t *, size_t);
55
56#endif
57
58/****************************************************************************/
void ec_debug_register(ec_debug_t *, const struct net_device *)
Register debug interface.
Definition debug.c:115
void ec_debug_send(ec_debug_t *, const uint8_t *, size_t)
Sends frame data to the interface.
Definition debug.c:159
int ec_debug_init(ec_debug_t *, ec_device_t *, const char *)
Debug interface constructor.
Definition debug.c:64
void ec_debug_clear(ec_debug_t *)
Debug interface destructor.
Definition debug.c:103
void ec_debug_unregister(ec_debug_t *)
Unregister debug interface.
Definition debug.c:144
EtherCAT interface for EtherCAT device drivers.
struct ec_device ec_device_t
Definition ecdev.h:45
Debugging network interface.
Definition debug.h:39
struct net_device * dev
net_device for virtual ethernet device
Definition debug.h:41
ec_device_t * device
Parent device.
Definition debug.h:40
uint8_t opened
net_device is opened
Definition debug.h:44
struct net_device_stats stats
device statistics
Definition debug.h:42
uint8_t registered
net_device is opened
Definition debug.h:43