master/ioctl.h
changeset 1972 c1b564299829
parent 1966 23c638a81fe7
child 2004 be807e224b0e
child 2009 b5391b329b5d
equal deleted inserted replaced
1971:ba8a75cb1c98 1972:c1b564299829
    54 
    54 
    55 /** EtherCAT master ioctl() version magic.
    55 /** EtherCAT master ioctl() version magic.
    56  *
    56  *
    57  * Increment this when changing the ioctl interface!
    57  * Increment this when changing the ioctl interface!
    58  */
    58  */
    59 #define EC_IOCTL_VERSION_MAGIC 9
    59 #define EC_IOCTL_VERSION_MAGIC 10
    60 
    60 
    61 // Command-line tool
    61 // Command-line tool
    62 #define EC_IOCTL_MODULE                EC_IOR(0x00, ec_ioctl_module_t)
    62 #define EC_IOCTL_MODULE                EC_IOR(0x00, ec_ioctl_module_t)
    63 #define EC_IOCTL_MASTER                EC_IOR(0x01, ec_ioctl_master_t)
    63 #define EC_IOCTL_MASTER                EC_IOR(0x01, ec_ioctl_master_t)
    64 #define EC_IOCTL_SLAVE                EC_IOWR(0x02, ec_ioctl_slave_t)
    64 #define EC_IOCTL_SLAVE                EC_IOWR(0x02, ec_ioctl_slave_t)
   419     uint16_t idn;
   419     uint16_t idn;
   420     uint32_t mem_size;
   420     uint32_t mem_size;
   421     uint8_t *data;
   421     uint8_t *data;
   422 
   422 
   423     // outputs
   423     // outputs
   424     uint32_t data_size;
   424     size_t data_size;
   425     uint16_t error_code;
   425     uint16_t error_code;
   426 } ec_ioctl_slave_soe_read_t;
   426 } ec_ioctl_slave_soe_read_t;
   427 
   427 
   428 /*****************************************************************************/
   428 /*****************************************************************************/
   429 
   429 
   430 typedef struct {
   430 typedef struct {
   431     // inputs
   431     // inputs
   432     uint16_t slave_position;
   432     uint16_t slave_position;
   433     uint8_t drive_no;
   433     uint8_t drive_no;
   434     uint16_t idn;
   434     uint16_t idn;
   435     uint32_t data_size;
   435     size_t data_size;
   436     uint8_t *data;
   436     uint8_t *data;
   437 
   437 
   438     // outputs
   438     // outputs
   439     uint16_t error_code;
   439     uint16_t error_code;
   440 } ec_ioctl_slave_soe_write_t;
   440 } ec_ioctl_slave_soe_write_t;
   528 
   528 
   529     // outputs
   529     // outputs
   530     uint8_t drive_no;
   530     uint8_t drive_no;
   531     uint16_t idn;
   531     uint16_t idn;
   532     ec_al_state_t state;
   532     ec_al_state_t state;
   533     uint32_t size;
   533     size_t size;
   534     uint8_t data[EC_MAX_IDN_DATA_SIZE];
   534     uint8_t data[EC_MAX_IDN_DATA_SIZE];
   535 } ec_ioctl_config_idn_t;
   535 } ec_ioctl_config_idn_t;
   536 
   536 
   537 /*****************************************************************************/
   537 /*****************************************************************************/
   538 
   538