EtherCAT master driver module.
|
Defines |
| #define | MAX_MASTERS 32 |
| | Maximum number of masters.
|
|
#define | EC_MAX_MAC_STRING_SIZE (3 * ETH_ALEN) |
| | Maximum MAC string size.
|
Functions |
| int __init | ec_init_module (void) |
| | Module initialization.
|
| void __exit | ec_cleanup_module (void) |
| | Module cleanup.
|
| static int | ec_mac_parse (uint8_t *mac, const char *src, int allow_empty) |
| | Parse a MAC address from a string.
|
|
unsigned int | ec_master_count (void) |
| | Get the number of masters.
|
| int | ec_mac_equal (const uint8_t *mac1, const uint8_t *mac2) |
| ssize_t | ec_mac_print (const uint8_t *mac, char *buffer) |
| | Print a MAC address to a buffer.
|
| int | ec_mac_is_zero (const uint8_t *mac) |
| int | ec_mac_is_broadcast (const uint8_t *mac) |
| void | ec_print_data (const uint8_t *data, size_t size) |
| | Outputs frame contents for debugging purposes.
|
| void | ec_print_data_diff (const uint8_t *d1, const uint8_t *d2, size_t size) |
| | Outputs frame contents and differences for debugging purposes.
|
| size_t | ec_state_string (uint8_t states, char *buffer, uint8_t multi) |
| | Prints slave states in clear text.
|
| 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.
|
| ec_master_t * | ecrt_request_master_err (unsigned int master_index) |
| | Request a master.
|
| ec_master_t * | ecrt_request_master (unsigned int master_index) |
| | Requests an EtherCAT master for realtime operation.
|
| void | ecrt_release_master (ec_master_t *master) |
| | Releases a requested EtherCAT master.
|
| unsigned int | ecrt_version_magic (void) |
| | Returns the version magic of the realtime interface.
|
Variables |
| static char * | main_devices [MAX_MASTERS] |
| | Main devices parameter.
|
| static unsigned int | master_count |
| | Number of masters.
|
| static char * | backup_devices [MAX_MASTERS] |
| | Backup devices parameter.
|
| static unsigned int | backup_count |
| | Number of backup devices.
|
| static unsigned int | debug_level |
| | Debug level parameter.
|
| static ec_master_t * | masters |
| | Array of masters.
|
| static struct semaphore | master_sem |
| | Master semaphore.
|
| dev_t | device_number |
| | Device number for master cdevs.
|
| struct class * | class |
| | Device class.
|
| static uint8_t | macs [MAX_MASTERS][2][ETH_ALEN] |
| | MAC addresses.
|
| char * | ec_master_version_str = EC_MASTER_VERSION |
| | Version string.
|
| const char * | ec_device_names [2] |
| | Device names.
|
| const ec_request_state_t | ec_request_state_translation_table [] |
| | Global request state type translation table.
|
EtherCAT master driver module.