master/command.h
changeset 199 04ecf40fc2e9
parent 197 b9a6e2c22745
child 208 b7797f8a813d
equal deleted inserted replaced
198:f7dff1ed01ba 199:04ecf40fc2e9
     1 /******************************************************************************
     1 /******************************************************************************
     2  *
       
     3  *  c o m m a n d . h
       
     4  *
       
     5  *  EtherCAT command structure.
       
     6  *
     2  *
     7  *  $Id$
     3  *  $Id$
     8  *
     4  *
     9  *  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
     5  *  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
    10  *
     6  *
    23  *  along with the IgH EtherCAT Master; if not, write to the Free Software
    19  *  along with the IgH EtherCAT Master; if not, write to the Free Software
    24  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    20  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    25  *
    21  *
    26  *****************************************************************************/
    22  *****************************************************************************/
    27 
    23 
       
    24 /**
       
    25    \file
       
    26    EtherCAT command structure.
       
    27 */
       
    28 
       
    29 /*****************************************************************************/
       
    30 
    28 #ifndef _EC_COMMAND_H_
    31 #ifndef _EC_COMMAND_H_
    29 #define _EC_COMMAND_H_
    32 #define _EC_COMMAND_H_
    30 
    33 
    31 #include <linux/list.h>
    34 #include <linux/list.h>
    32 
    35 
    33 #include "globals.h"
    36 #include "globals.h"
    34 
       
    35 /*****************************************************************************/
       
    36 
       
    37 /**
       
    38    \defgroup Command EtherCAT command
       
    39    Data types and functions for EtherCAT commands.
       
    40    An EtherCAT command is sent and received using the ec_command_t data type.
       
    41    It is passed to the master, which handles commands in a queue.
       
    42    \{
       
    43 */
       
    44 
    37 
    45 /*****************************************************************************/
    38 /*****************************************************************************/
    46 
    39 
    47 /**
    40 /**
    48    EtherCAT command type.
    41    EtherCAT command type.
    96 ec_address_t;
    89 ec_address_t;
    97 
    90 
    98 /*****************************************************************************/
    91 /*****************************************************************************/
    99 
    92 
   100 /**
    93 /**
   101    EtherCAT command
    94    EtherCAT command.
   102 */
    95 */
   103 
    96 
   104 typedef struct
    97 typedef struct
   105 {
    98 {
   106     struct list_head list; /**< needed by domain command lists */
    99     struct list_head list; /**< needed by domain command lists */
   114     uint16_t working_counter; /**< working counter */
   107     uint16_t working_counter; /**< working counter */
   115     ec_command_state_t state; /**< command state */
   108     ec_command_state_t state; /**< command state */
   116 }
   109 }
   117 ec_command_t;
   110 ec_command_t;
   118 
   111 
   119 /** \} */
       
   120 
       
   121 /*****************************************************************************/
   112 /*****************************************************************************/
   122 
   113 
   123 void ec_command_init(ec_command_t *);
   114 void ec_command_init(ec_command_t *);
   124 void ec_command_clear(ec_command_t *);
   115 void ec_command_clear(ec_command_t *);
   125 
   116