IgH EtherCAT Master  1.6.2
debug.h File Reference

Network interface for debugging purposes. More...

Go to the source code of this file.

Data Structures

struct  ec_debug_t
 Debugging network interface. More...
 

Functions

int ec_debug_init (ec_debug_t *, ec_device_t *, const char *)
 Debug interface constructor. More...
 
void ec_debug_clear (ec_debug_t *)
 Debug interface destructor. More...
 
void ec_debug_register (ec_debug_t *, const struct net_device *)
 Register debug interface.
 
void ec_debug_unregister (ec_debug_t *)
 Unregister debug interface.
 
void ec_debug_send (ec_debug_t *, const uint8_t *, size_t)
 Sends frame data to the interface.
 

Detailed Description

Network interface for debugging purposes.

Definition in file debug.h.

Function Documentation

◆ ec_debug_init()

int ec_debug_init ( ec_debug_t dbg,
ec_device_t device,
const char *  name 
)

Debug interface constructor.

Initializes the debug object, creates a net_device and registeres it.

Return values
0Success.
<0Error code.
Parameters
dbgDebug object.
deviceEtherCAT device.
nameInterface name.

Definition at line 64 of file debug.c.

◆ ec_debug_clear()

void ec_debug_clear ( ec_debug_t dbg)

Debug interface destructor.

Unregisters the net_device and frees allocated memory.

Parameters
dbgdebug object

Definition at line 103 of file debug.c.