|
IgH EtherCAT Master
1.6.9
|
Master interface for EtherCAT-capable network device drivers. More...
Functions | |
| void | ecdev_withdraw (ec_device_t *device) |
| Withdraws an EtherCAT device from the master. | |
| int | ecdev_open (ec_device_t *device) |
| Opens the network device and makes the master enter IDLE phase. | |
| void | ecdev_close (ec_device_t *device) |
| Makes the master leave IDLE phase and closes the network device. | |
| void | ecdev_receive (ec_device_t *device, const void *data, size_t size) |
| Accepts a received frame. | |
| void | ecdev_set_link (ec_device_t *device, uint8_t state) |
| Sets a new link state. | |
| uint8_t | ecdev_get_link (const ec_device_t *device) |
| Reads the link state. | |
| ec_device_t * | ecdev_offer (struct net_device *net_dev, ec_pollfunc_t poll, struct module *module) |
| Offers an EtherCAT device to a certain master. | |
Master interface for EtherCAT-capable network device drivers.
Through the EtherCAT device interface, EtherCAT-capable network device drivers are able to connect their device(s) to the master, pass received frames and notify the master about status changes. The master on his part, can send his frames through connected devices.
| void ecdev_withdraw | ( | ec_device_t * | device | ) |
Withdraws an EtherCAT device from the master.
The device is disconnected from the master and all device ressources are freed.
| device | EtherCAT device |
| int ecdev_open | ( | ec_device_t * | device | ) |
| void ecdev_close | ( | ec_device_t * | device | ) |
| void ecdev_receive | ( | ec_device_t * | device, |
| const void * | data, | ||
| size_t | size ) |
Accepts a received frame.
Forwards the received data to the master. The master will analyze the frame and dispatch the received commands to the sending instances.
The data have to begin with the Ethernet header (target MAC address).
| device | EtherCAT device |
| data | pointer to received data |
| size | number of bytes received |
| void ecdev_set_link | ( | ec_device_t * | device, |
| uint8_t | state ) |
| uint8_t ecdev_get_link | ( | const ec_device_t * | device | ) |
| ec_device_t * ecdev_offer | ( | struct net_device * | net_dev, |
| ec_pollfunc_t | poll, | ||
| struct module * | module ) |
Offers an EtherCAT device to a certain master.
The master decides, if it wants to use the device for EtherCAT operation, or not. It is important, that the offered net_device is not used by the kernel IP stack. If the master, accepted the offer, the address of the newly created EtherCAT device is returned, else NULL is returned.
| net_dev | net_device to offer |
| poll | device poll function |
| module | pointer to the module |