drivers/ec_command.c
author Florian Pose <fp@igh-essen.com>
Fri, 28 Oct 2005 15:12:27 +0000
changeset 2 b0a7a4745bf9
parent 0 05c992bf5847
child 13 db0742533c10
permissions -rw-r--r--
?nderungen an no_rtai r110:110 in drivers gemergt.
/****************************************************************
 *
 *  e c _ c o m m a n d . c
 *
 *  Methoden für ein EtherCAT-Kommando.
 *
 *  $Date$
 *  $Author$
 *
 ***************************************************************/

#include <linux/slab.h>

#include "ec_command.h"

/***************************************************************/

/**
   Kommando-Konstruktor.

   Initialisiert alle Variablen innerhalb des Kommandos auf die
   Default-Werte.
   
   @param cmd Zeiger auf das zu initialisierende Kommando.
*/

void EtherCAT_command_init(EtherCAT_command_t *cmd)
{
  cmd->type = ECAT_CMD_NONE;
  cmd->address.logical = 0x00000000;
  cmd->data_length = 0;
  cmd->next = NULL;
  cmd->state = ECAT_CS_READY;
  cmd->index = 0;
  cmd->working_counter = 0;
}

/***************************************************************/

/**
   Kommando-Destruktor.

   Setzt alle Attribute auf den Anfangswert zurueck.
   
   @param cmd Zeiger auf das zu initialisierende Kommando.
*/

void EtherCAT_command_clear(EtherCAT_command_t *cmd)
{
  EtherCAT_command_init(cmd);
}

/***************************************************************/