diff -r fce58ba8a912 -r ef1266652c4d master/ioctl.h --- a/master/ioctl.h Wed Jul 02 09:22:55 2008 +0000 +++ b/master/ioctl.h Wed Jul 02 11:26:51 2008 +0000 @@ -47,33 +47,33 @@ /*****************************************************************************/ -#define EC_IOCTL_TYPE 0xa4 - -#define EC_IO(nr) _IO(EC_IOCTL_TYPE,nr) -#define EC_IOR(nr,type) _IOR(EC_IOCTL_TYPE,nr,type) -#define EC_IOW(nr,type) _IOW(EC_IOCTL_TYPE,nr,type) -#define EC_IOWR(nr,type) _IOWR(EC_IOCTL_TYPE,nr,type) - -#define EC_IOCTL_MASTER EC_IOR(0x00, ec_ioctl_master_t) -#define EC_IOCTL_SLAVE EC_IOWR(0x01, ec_ioctl_slave_t) -#define EC_IOCTL_SYNC EC_IOWR(0x02, ec_ioctl_sync_t) -#define EC_IOCTL_PDO EC_IOWR(0x03, ec_ioctl_pdo_t) -#define EC_IOCTL_PDO_ENTRY EC_IOWR(0x04, ec_ioctl_pdo_entry_t) -#define EC_IOCTL_DOMAIN EC_IOWR(0x05, ec_ioctl_domain_t) -#define EC_IOCTL_DOMAIN_FMMU EC_IOWR(0x06, ec_ioctl_domain_fmmu_t) -#define EC_IOCTL_DATA EC_IOWR(0x07, ec_ioctl_data_t) -#define EC_IOCTL_SET_DEBUG EC_IO(0x08) -#define EC_IOCTL_SLAVE_STATE EC_IOW(0x09, ec_ioctl_slave_state_t) -#define EC_IOCTL_SDO EC_IOWR(0x0a, ec_ioctl_sdo_t) -#define EC_IOCTL_SDO_ENTRY EC_IOWR(0x0b, ec_ioctl_sdo_entry_t) -#define EC_IOCTL_SDO_UPLOAD EC_IOWR(0x0c, ec_ioctl_sdo_upload_t) -#define EC_IOCTL_SDO_DOWNLOAD EC_IOWR(0x0d, ec_ioctl_sdo_download_t) -#define EC_IOCTL_SII_READ EC_IOWR(0x0e, ec_ioctl_sii_t) -#define EC_IOCTL_SII_WRITE EC_IOW(0x0f, ec_ioctl_sii_t) -#define EC_IOCTL_CONFIG EC_IOWR(0x10, ec_ioctl_config_t) -#define EC_IOCTL_CONFIG_PDO EC_IOWR(0x11, ec_ioctl_config_pdo_t) -#define EC_IOCTL_CONFIG_PDO_ENTRY EC_IOWR(0x12, ec_ioctl_config_pdo_entry_t) -#define EC_IOCTL_CONFIG_SDO EC_IOWR(0x13, ec_ioctl_config_sdo_t) +#define EC_IOCTL_TYPE 0xa4 + +#define EC_IO(nr) _IO(EC_IOCTL_TYPE, nr) +#define EC_IOR(nr, type) _IOR(EC_IOCTL_TYPE, nr, type) +#define EC_IOW(nr, type) _IOW(EC_IOCTL_TYPE, nr, type) +#define EC_IOWR(nr, type) _IOWR(EC_IOCTL_TYPE, nr, type) + +#define EC_IOCTL_MASTER EC_IOR(0x00, ec_ioctl_master_t) +#define EC_IOCTL_SLAVE EC_IOWR(0x01, ec_ioctl_slave_t) +#define EC_IOCTL_SLAVE_SYNC EC_IOWR(0x02, ec_ioctl_slave_sync_t) +#define EC_IOCTL_SLAVE_SYNC_PDO EC_IOWR(0x03, ec_ioctl_slave_sync_pdo_t) +#define EC_IOCTL_SLAVE_SYNC_PDO_ENTRY EC_IOWR(0x04, ec_ioctl_slave_sync_pdo_entry_t) +#define EC_IOCTL_DOMAIN EC_IOWR(0x05, ec_ioctl_domain_t) +#define EC_IOCTL_DOMAIN_FMMU EC_IOWR(0x06, ec_ioctl_domain_fmmu_t) +#define EC_IOCTL_DOMAIN_DATA EC_IOWR(0x07, ec_ioctl_domain_data_t) +#define EC_IOCTL_MASTER_DEBUG EC_IO(0x08) +#define EC_IOCTL_SLAVE_STATE EC_IOW(0x09, ec_ioctl_slave_state_t) +#define EC_IOCTL_SLAVE_SDO EC_IOWR(0x0a, ec_ioctl_slave_sdo_t) +#define EC_IOCTL_SLAVE_SDO_ENTRY EC_IOWR(0x0b, ec_ioctl_slave_sdo_entry_t) +#define EC_IOCTL_SLAVE_SDO_UPLOAD EC_IOWR(0x0c, ec_ioctl_slave_sdo_upload_t) +#define EC_IOCTL_SLAVE_SDO_DOWNLOAD EC_IOWR(0x0d, ec_ioctl_slave_sdo_download_t) +#define EC_IOCTL_SLAVE_SII_READ EC_IOWR(0x0e, ec_ioctl_slave_sii_t) +#define EC_IOCTL_SLAVE_SII_WRITE EC_IOW(0x0f, ec_ioctl_slave_sii_t) +#define EC_IOCTL_CONFIG EC_IOWR(0x10, ec_ioctl_config_t) +#define EC_IOCTL_CONFIG_PDO EC_IOWR(0x11, ec_ioctl_config_pdo_t) +#define EC_IOCTL_CONFIG_PDO_ENTRY EC_IOWR(0x12, ec_ioctl_config_pdo_entry_t) +#define EC_IOCTL_CONFIG_SDO EC_IOWR(0x13, ec_ioctl_config_sdo_t) #define EC_IOCTL_STRING_SIZE 64 @@ -135,7 +135,7 @@ uint8_t enable; uint8_t assign_source; uint8_t pdo_count; -} ec_ioctl_sync_t; +} ec_ioctl_slave_sync_t; /*****************************************************************************/ @@ -149,7 +149,7 @@ uint16_t index; uint8_t entry_count; int8_t name[EC_IOCTL_STRING_SIZE]; -} ec_ioctl_pdo_t; +} ec_ioctl_slave_sync_pdo_t; /*****************************************************************************/ @@ -165,7 +165,7 @@ uint8_t subindex; uint8_t bit_length; int8_t name[EC_IOCTL_STRING_SIZE]; -} ec_ioctl_pdo_entry_t; +} ec_ioctl_slave_sync_pdo_entry_t; /*****************************************************************************/ @@ -204,7 +204,7 @@ uint32_t domain_index; uint32_t data_size; uint8_t *target; -} ec_ioctl_data_t; +} ec_ioctl_domain_data_t; /*****************************************************************************/ @@ -225,7 +225,7 @@ uint16_t sdo_index; uint8_t max_subindex; int8_t name[EC_IOCTL_STRING_SIZE]; -} ec_ioctl_sdo_t; +} ec_ioctl_slave_sdo_t; /*****************************************************************************/ @@ -239,7 +239,7 @@ uint16_t data_type; uint16_t bit_length; int8_t description[EC_IOCTL_STRING_SIZE]; -} ec_ioctl_sdo_entry_t; +} ec_ioctl_slave_sdo_entry_t; /*****************************************************************************/ @@ -254,7 +254,7 @@ // outputs uint32_t data_size; uint32_t abort_code; -} ec_ioctl_sdo_upload_t; +} ec_ioctl_slave_sdo_upload_t; /*****************************************************************************/ @@ -268,7 +268,7 @@ // outputs uint32_t abort_code; -} ec_ioctl_sdo_download_t; +} ec_ioctl_slave_sdo_download_t; /*****************************************************************************/ @@ -278,7 +278,7 @@ uint16_t offset; uint32_t nwords; uint16_t *words; -} ec_ioctl_sii_t; +} ec_ioctl_slave_sii_t; /*****************************************************************************/