fp@0: //--------------------------------------------------------------- fp@0: // fp@0: // e c _ c o m m a n d . h fp@0: // fp@0: // $LastChangedDate$ fp@0: // $Author$ fp@0: // fp@0: //--------------------------------------------------------------- fp@0: fp@0: typedef enum {Waiting, Sent, Received} EtherCAT_cmd_status_t; fp@0: fp@0: //--------------------------------------------------------------- fp@0: fp@0: typedef struct EtherCAT_command fp@0: { fp@0: unsigned char command_type; fp@0: short ring_position; fp@0: unsigned short node_address; fp@0: unsigned short mem_address; fp@0: unsigned int logical_address; fp@0: unsigned int data_length; fp@0: fp@0: struct EtherCAT_command *next; fp@0: fp@0: EtherCAT_cmd_status_t status; fp@0: unsigned char command_index; fp@0: unsigned int working_counter; fp@0: fp@0: unsigned char *data; fp@0: fp@0: } fp@0: EtherCAT_command_t; fp@0: fp@0: //--------------------------------------------------------------- fp@0: fp@0: void EtherCAT_command_init(EtherCAT_command_t *); fp@0: void EtherCAT_command_clear(EtherCAT_command_t *); fp@0: fp@0: // Debug fp@0: void EtherCAT_command_print_data(EtherCAT_command_t *); fp@0: fp@0: //---------------------------------------------------------------