libethercat
libethercat copied to clipboard
Idea: ec_open() with config struct
Currently, the ec_open call looks like this
int ec_open(ec_t *pec, const osal_char_t *ifname, int prio, int cpumask, int eeprom_log)
Having something like the following would enable the extension of the configuration more easily:
//! ethercat master configuration structure
typedef struct ec_config {
const osal_char_t *ifname; //!< Ethercat master interface name.
int prio; //!< Receive thread priority
int cpumask; //!< Receive thread cpumask.
int eeprom_log; //!< Log eeprom to stdout.
} ec_config_t;
int ec_open(ec_t *pec, ec_config_t config)
Background: I need to pass the socket_priority to implement a SO_TXTIME capable device
I can provide a PR for this, but it is a breaking change to the API
related to #12
this should be also resolved if going for the feat/hw_rework branch