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