master/ioctl.h
changeset 1001 a8eab75aa8e3
parent 990 4f223f3df05a
child 1029 61ffe5f22306
equal deleted inserted replaced
1000:5746fdd1ca2e 1001:a8eab75aa8e3
    57 #define EC_IOCTL_MASTER            EC_IOR(0x00, ec_ioctl_master_t)
    57 #define EC_IOCTL_MASTER            EC_IOR(0x00, ec_ioctl_master_t)
    58 #define EC_IOCTL_SLAVE            EC_IOWR(0x01, ec_ioctl_slave_t)
    58 #define EC_IOCTL_SLAVE            EC_IOWR(0x01, ec_ioctl_slave_t)
    59 #define EC_IOCTL_SYNC             EC_IOWR(0x02, ec_ioctl_sync_t)
    59 #define EC_IOCTL_SYNC             EC_IOWR(0x02, ec_ioctl_sync_t)
    60 #define EC_IOCTL_PDO              EC_IOWR(0x03, ec_ioctl_pdo_t)
    60 #define EC_IOCTL_PDO              EC_IOWR(0x03, ec_ioctl_pdo_t)
    61 #define EC_IOCTL_PDO_ENTRY        EC_IOWR(0x04, ec_ioctl_pdo_entry_t)
    61 #define EC_IOCTL_PDO_ENTRY        EC_IOWR(0x04, ec_ioctl_pdo_entry_t)
    62 #define EC_IOCTL_DOMAIN_COUNT       EC_IO(0x05)
    62 #define EC_IOCTL_DOMAIN           EC_IOWR(0x05, ec_ioctl_domain_t)
    63 #define EC_IOCTL_DOMAIN           EC_IOWR(0x06, ec_ioctl_domain_t)
    63 #define EC_IOCTL_DOMAIN_FMMU      EC_IOWR(0x06, ec_ioctl_domain_fmmu_t)
    64 #define EC_IOCTL_DOMAIN_FMMU      EC_IOWR(0x07, ec_ioctl_domain_fmmu_t)
    64 #define EC_IOCTL_DATA             EC_IOWR(0x07, ec_ioctl_data_t)
    65 #define EC_IOCTL_DATA             EC_IOWR(0x08, ec_ioctl_data_t)
    65 #define EC_IOCTL_SET_DEBUG          EC_IO(0x08)
    66 #define EC_IOCTL_SET_DEBUG          EC_IO(0x09)
    66 #define EC_IOCTL_SLAVE_STATE       EC_IOW(0x09, ec_ioctl_slave_state_t)
    67 #define EC_IOCTL_SLAVE_STATE       EC_IOW(0x0a, ec_ioctl_slave_state_t)
    67 #define EC_IOCTL_SDO              EC_IOWR(0x0a, ec_ioctl_sdo_t)
    68 #define EC_IOCTL_SDO              EC_IOWR(0x0b, ec_ioctl_sdo_t)
    68 #define EC_IOCTL_SDO_ENTRY        EC_IOWR(0x0b, ec_ioctl_sdo_entry_t)
    69 #define EC_IOCTL_SDO_ENTRY        EC_IOWR(0x0c, ec_ioctl_sdo_entry_t)
    69 #define EC_IOCTL_SDO_UPLOAD       EC_IOWR(0x0c, ec_ioctl_sdo_upload_t)
    70 #define EC_IOCTL_SDO_UPLOAD       EC_IOWR(0x0d, ec_ioctl_sdo_upload_t)
    70 #define EC_IOCTL_SDO_DOWNLOAD      EC_IOW(0x0d, ec_ioctl_sdo_download_t)
    71 #define EC_IOCTL_SDO_DOWNLOAD      EC_IOW(0x0e, ec_ioctl_sdo_download_t)
    71 #define EC_IOCTL_SII_READ         EC_IOWR(0x0e, ec_ioctl_sii_t)
    72 #define EC_IOCTL_SII_READ         EC_IOWR(0x0f, ec_ioctl_sii_t)
    72 #define EC_IOCTL_SII_WRITE         EC_IOW(0x0f, ec_ioctl_sii_t)
    73 #define EC_IOCTL_SII_WRITE         EC_IOW(0x10, ec_ioctl_sii_t)
    73 #define EC_IOCTL_CONFIG           EC_IOWR(0x10, ec_ioctl_config_t)
    74 #define EC_IOCTL_CONFIG           EC_IOWR(0x11, ec_ioctl_config_t)
    74 #define EC_IOCTL_CONFIG_PDO       EC_IOWR(0x11, ec_ioctl_config_pdo_t)
    75 #define EC_IOCTL_CONFIG_PDO       EC_IOWR(0x12, ec_ioctl_config_pdo_t)
       
    76 #define EC_IOCTL_CONFIG_PDO_ENTRY EC_IOWR(0x12, ec_ioctl_config_pdo_entry_t)
    75 #define EC_IOCTL_CONFIG_PDO_ENTRY EC_IOWR(0x12, ec_ioctl_config_pdo_entry_t)
    77 #define EC_IOCTL_CONFIG_SDO       EC_IOWR(0x13, ec_ioctl_config_sdo_t)
    76 #define EC_IOCTL_CONFIG_SDO       EC_IOWR(0x13, ec_ioctl_config_sdo_t)
    78 
    77 
    79 #define EC_IOCTL_STRING_SIZE 64
    78 #define EC_IOCTL_STRING_SIZE 64
    80 
    79 
    81 /*****************************************************************************/
    80 /*****************************************************************************/
    82 
    81 
    83 typedef struct {
    82 typedef struct {
    84     uint32_t slave_count;
    83     uint32_t slave_count;
    85     uint32_t config_count;
    84     uint32_t config_count;
       
    85     uint32_t domain_count;
    86     uint8_t mode;
    86     uint8_t mode;
    87     struct {
    87     struct {
    88         uint8_t address[6];
    88         uint8_t address[6];
    89         uint8_t attached;
    89         uint8_t attached;
    90         uint32_t tx_count;
    90         uint32_t tx_count;