EtherCAT device methods.
More...
Go to the source code of this file.
EtherCAT device methods.
Definition in file device.c.
Constructor.
- Returns
- 0 in case of success, else < 0
- Parameters
-
| device | EtherCAT device |
| master | master owning the device |
Definition at line 63 of file device.c.
Destructor.
- Parameters
-
Definition at line 162 of file device.c.
Associate with net_device.
- Parameters
-
| device | EtherCAT device |
| net_dev | net_device structure |
| poll | pointer to device's poll function |
| module | the device's module |
Definition at line 182 of file device.c.
Disconnect from net_device.
- Parameters
-
Definition at line 213 of file device.c.
Opens the EtherCAT device.
- Returns
- 0 in case of success, else < 0
- Parameters
-
Definition at line 242 of file device.c.
Stops the EtherCAT device.
- Returns
- 0 in case of success, else < 0
- Parameters
-
Definition at line 279 of file device.c.
Returns a pointer to the device's transmit memory.
- Returns
- pointer to the TX socket buffer
- Parameters
-
Definition at line 312 of file device.c.
| void ec_device_send |
( |
ec_device_t * |
device, |
|
|
size_t |
size |
|
) |
| |
Sends the content of the transmit socket buffer.
Cuts the socket buffer content to the (now known) size, and calls the start_xmit() function of the assigned net_device.
- Parameters
-
| device | EtherCAT device |
| size | number of bytes to send |
Definition at line 331 of file device.c.
Clears the frame statistics.
- Parameters
-
Definition at line 374 of file device.c.
Calls the poll function of the assigned net_device.
The master itself works without using interrupts. Therefore the processing of received data and status changes of the network device has to be done by the master calling the ISR "manually".
- Parameters
-
Definition at line 478 of file device.c.
Update device statistics.
- Parameters
-
Definition at line 496 of file device.c.