drivers/ec_master.h
changeset 2 b0a7a4745bf9
parent 0 05c992bf5847
child 11 e58d78234412
equal deleted inserted replaced
1:98acc19c7594 2:b0a7a4745bf9
    49                                                     im EtherCAT-Gerät */
    49                                                     im EtherCAT-Gerät */
    50 
    50 
    51   unsigned char *process_data; /**< Zeiger auf Speicher mit Prozessdaten */
    51   unsigned char *process_data; /**< Zeiger auf Speicher mit Prozessdaten */
    52   unsigned int process_data_length; /**< Länge der Prozessdaten */
    52   unsigned int process_data_length; /**< Länge der Prozessdaten */
    53 
    53 
    54   EtherCAT_command_t cmd_ring[ECAT_COMMAND_RING_SIZE]; /** Statischer Kommandoring */
    54   EtherCAT_command_t cmd_ring[ECAT_COMMAND_RING_SIZE]; /**< Statischer Kommandoring */
       
    55   int cmd_reserved[ECAT_COMMAND_RING_SIZE]; /**< Reservierungsflags für die Kommandos */
    55   unsigned int cmd_ring_index; /**< Index des nächsten Kommandos im Ring */
    56   unsigned int cmd_ring_index; /**< Index des nächsten Kommandos im Ring */
       
    57 
       
    58   int debug_level; /**< Debug-Level im Master-Code */
    56 }
    59 }
    57 EtherCAT_master_t;
    60 EtherCAT_master_t;
    58 
    61 
    59 /***************************************************************/
    62 /***************************************************************/
    60 
    63 
    74 int EtherCAT_async_send_receive(EtherCAT_master_t *);
    77 int EtherCAT_async_send_receive(EtherCAT_master_t *);
    75 int EtherCAT_send(EtherCAT_master_t *);
    78 int EtherCAT_send(EtherCAT_master_t *);
    76 int EtherCAT_receive(EtherCAT_master_t *);
    79 int EtherCAT_receive(EtherCAT_master_t *);
    77 int EtherCAT_write_process_data(EtherCAT_master_t *);
    80 int EtherCAT_write_process_data(EtherCAT_master_t *);
    78 int EtherCAT_read_process_data(EtherCAT_master_t *);
    81 int EtherCAT_read_process_data(EtherCAT_master_t *);
       
    82 void EtherCAT_clear_process_data(EtherCAT_master_t *);
    79 
    83 
    80 /***************************************************************/
    84 /***************************************************************/
    81 
    85 
    82 // Slave information interface
    86 // Slave information interface
    83 int EtherCAT_read_slave_information(EtherCAT_master_t *,
    87 int EtherCAT_read_slave_information(EtherCAT_master_t *,
   123 
   127 
   124 /***************************************************************/
   128 /***************************************************************/
   125 
   129 
   126 // Private functions
   130 // Private functions
   127 EtherCAT_command_t *alloc_cmd(EtherCAT_master_t *);
   131 EtherCAT_command_t *alloc_cmd(EtherCAT_master_t *);
   128 void add_command(EtherCAT_master_t *, EtherCAT_command_t *);
   132 int add_command(EtherCAT_master_t *, EtherCAT_command_t *);
   129 void set_byte(unsigned char *, unsigned int, unsigned char);
   133 void set_byte(unsigned char *, unsigned int, unsigned char);
   130 void set_word(unsigned char *, unsigned int, unsigned int);
   134 void set_word(unsigned char *, unsigned int, unsigned int);
   131 
   135 
   132 /***************************************************************/
   136 /***************************************************************/
   133 
   137