master/ioctl.h
changeset 1837 32136215c1fa
parent 1831 1875b9fea0ba
child 1851 a56bd34e20a1
equal deleted inserted replaced
1836:52036efdf1e3 1837:32136215c1fa
    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 2
    59 #define EC_IOCTL_VERSION_MAGIC 3
    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)
    78 #define EC_IOCTL_SLAVE_SII_WRITE       EC_IOW(0x10, ec_ioctl_slave_sii_t)
    78 #define EC_IOCTL_SLAVE_SII_WRITE       EC_IOW(0x10, ec_ioctl_slave_sii_t)
    79 #define EC_IOCTL_SLAVE_REG_READ       EC_IOWR(0x11, ec_ioctl_slave_reg_t)
    79 #define EC_IOCTL_SLAVE_REG_READ       EC_IOWR(0x11, ec_ioctl_slave_reg_t)
    80 #define EC_IOCTL_SLAVE_REG_WRITE       EC_IOW(0x12, ec_ioctl_slave_reg_t)
    80 #define EC_IOCTL_SLAVE_REG_WRITE       EC_IOW(0x12, ec_ioctl_slave_reg_t)
    81 #define EC_IOCTL_SLAVE_FOE_READ       EC_IOWR(0x13, ec_ioctl_slave_foe_t)
    81 #define EC_IOCTL_SLAVE_FOE_READ       EC_IOWR(0x13, ec_ioctl_slave_foe_t)
    82 #define EC_IOCTL_SLAVE_FOE_WRITE       EC_IOW(0x14, ec_ioctl_slave_foe_t)
    82 #define EC_IOCTL_SLAVE_FOE_WRITE       EC_IOW(0x14, ec_ioctl_slave_foe_t)
    83 #define EC_IOCTL_SLAVE_SOE_READ       EC_IOWR(0x15, ec_ioctl_slave_soe_t)
    83 #define EC_IOCTL_SLAVE_SOE_READ       EC_IOWR(0x15, ec_ioctl_slave_soe_read_t)
    84 #define EC_IOCTL_SLAVE_SOE_WRITE      EC_IOWR(0x16, ec_ioctl_slave_soe_t)
    84 #define EC_IOCTL_SLAVE_SOE_WRITE      EC_IOWR(0x16, ec_ioctl_slave_soe_write_t)
    85 #define EC_IOCTL_CONFIG               EC_IOWR(0x17, ec_ioctl_config_t)
    85 #define EC_IOCTL_CONFIG               EC_IOWR(0x17, ec_ioctl_config_t)
    86 #define EC_IOCTL_CONFIG_PDO           EC_IOWR(0x18, ec_ioctl_config_pdo_t)
    86 #define EC_IOCTL_CONFIG_PDO           EC_IOWR(0x18, ec_ioctl_config_pdo_t)
    87 #define EC_IOCTL_CONFIG_PDO_ENTRY     EC_IOWR(0x19, ec_ioctl_config_pdo_entry_t)
    87 #define EC_IOCTL_CONFIG_PDO_ENTRY     EC_IOWR(0x19, ec_ioctl_config_pdo_entry_t)
    88 #define EC_IOCTL_CONFIG_SDO           EC_IOWR(0x1a, ec_ioctl_config_sdo_t)
    88 #define EC_IOCTL_CONFIG_SDO           EC_IOWR(0x1a, ec_ioctl_config_sdo_t)
    89 #ifdef EC_EOE
    89 #ifdef EC_EOE
   411     uint32_t mem_size;
   411     uint32_t mem_size;
   412     uint8_t *data;
   412     uint8_t *data;
   413 
   413 
   414     // outputs
   414     // outputs
   415     uint32_t data_size;
   415     uint32_t data_size;
   416     uint32_t result;
       
   417     uint16_t error_code;
   416     uint16_t error_code;
   418 } ec_ioctl_slave_soe_t;
   417 } ec_ioctl_slave_soe_read_t;
       
   418 
       
   419 /*****************************************************************************/
       
   420 
       
   421 typedef struct {
       
   422     // inputs
       
   423     uint16_t slave_position;
       
   424     uint16_t idn;
       
   425     uint32_t data_size;
       
   426     uint8_t *data;
       
   427 
       
   428     // outputs
       
   429     uint16_t error_code;
       
   430 } ec_ioctl_slave_soe_write_t;
   419 
   431 
   420 /*****************************************************************************/
   432 /*****************************************************************************/
   421 
   433 
   422 typedef struct {
   434 typedef struct {
   423     // inputs
   435     // inputs