Code zum Senden/Empfangen mehrerer Kommandos in einem Frame vorerst ganz entfernt.
This commit is contained in:
parent
729f64b0fb
commit
0bd10ceee7
|
|
@ -30,7 +30,6 @@ 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;
|
||||
|
|
|
|||
|
|
@ -69,11 +69,6 @@ typedef struct EtherCAT_command
|
|||
EtherCAT_address_t address; /**< Adresse des/der Empfänger */
|
||||
unsigned int data_length; /**< Länge der zu sendenden und/oder empfangenen Daten */
|
||||
|
||||
#if 0
|
||||
struct EtherCAT_command *next; /**< (Für den Master) Zeiger auf nächstes Kommando
|
||||
in der Liste */
|
||||
#endif
|
||||
|
||||
EtherCAT_command_state_t state; /**< Zustand des Kommandos (bereit, gesendet, etc...) */
|
||||
unsigned char index; /**< Kommando-Index, mit der das Kommando gesendet wurde (wird
|
||||
vom Master beim Senden gesetzt. */
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@
|
|||
#include "ec_device.h"
|
||||
#include "ec_dbg.h"
|
||||
|
||||
extern void rtl8139_interrupt(int, void *, struct pt_regs *);
|
||||
|
||||
/***************************************************************/
|
||||
|
||||
/**
|
||||
|
|
|
|||
1176
drivers/ec_master.c
1176
drivers/ec_master.c
File diff suppressed because it is too large
Load Diff
|
|
@ -31,10 +31,6 @@ typedef struct
|
|||
mit Slave-Informationen */
|
||||
unsigned int slave_count; /**< Anzahl der Slaves in slaves */
|
||||
|
||||
#if 0
|
||||
EtherCAT_command_t *first_command; /**< Zeiger auf das erste
|
||||
Kommando in der Liste */
|
||||
#endif
|
||||
EtherCAT_command_t process_data_command; /**< Kommando zum Senden und
|
||||
Empfangen der Prozessdaten */
|
||||
|
||||
|
|
@ -52,12 +48,6 @@ typedef struct
|
|||
unsigned char *process_data; /**< Zeiger auf Speicher mit Prozessdaten */
|
||||
unsigned int process_data_length; /**< Länge der Prozessdaten */
|
||||
|
||||
#if 0
|
||||
EtherCAT_command_t cmd_ring[ECAT_COMMAND_RING_SIZE]; /**< Statischer Kommandoring */
|
||||
int cmd_reserved[ECAT_COMMAND_RING_SIZE]; /**< Reservierungsflags für die Kommandos */
|
||||
unsigned int cmd_ring_index; /**< Index des nächsten Kommandos im Ring */
|
||||
#endif
|
||||
|
||||
int debug_level; /**< Debug-Level im Master-Code */
|
||||
}
|
||||
EtherCAT_master_t;
|
||||
|
|
@ -68,81 +58,30 @@ EtherCAT_master_t;
|
|||
int EtherCAT_master_init(EtherCAT_master_t *, EtherCAT_device_t *);
|
||||
void EtherCAT_master_clear(EtherCAT_master_t *);
|
||||
|
||||
// Slave management
|
||||
int EtherCAT_check_slaves(EtherCAT_master_t *, EtherCAT_slave_t *, unsigned int);
|
||||
void EtherCAT_clear_slaves(EtherCAT_master_t *);
|
||||
int EtherCAT_activate_slave(EtherCAT_master_t *, EtherCAT_slave_t *);
|
||||
int EtherCAT_deactivate_slave(EtherCAT_master_t *, EtherCAT_slave_t *);
|
||||
int EtherCAT_activate_all_slaves(EtherCAT_master_t *);
|
||||
int EtherCAT_deactivate_all_slaves(EtherCAT_master_t *);
|
||||
|
||||
// Sending and receiving
|
||||
#if 0
|
||||
int EtherCAT_async_send_receive(EtherCAT_master_t *);
|
||||
int EtherCAT_send(EtherCAT_master_t *);
|
||||
int EtherCAT_receive(EtherCAT_master_t *);
|
||||
#endif
|
||||
int EtherCAT_simple_send_receive(EtherCAT_master_t *, EtherCAT_command_t *);
|
||||
int EtherCAT_simple_send(EtherCAT_master_t *, EtherCAT_command_t *);
|
||||
int EtherCAT_simple_receive(EtherCAT_master_t *, EtherCAT_command_t *);
|
||||
|
||||
int EtherCAT_write_process_data(EtherCAT_master_t *);
|
||||
int EtherCAT_read_process_data(EtherCAT_master_t *);
|
||||
void EtherCAT_clear_process_data(EtherCAT_master_t *);
|
||||
|
||||
/***************************************************************/
|
||||
|
||||
// Slave information interface
|
||||
// Slave management
|
||||
int EtherCAT_check_slaves(EtherCAT_master_t *, EtherCAT_slave_t *, unsigned int);
|
||||
void EtherCAT_clear_slaves(EtherCAT_master_t *);
|
||||
int EtherCAT_read_slave_information(EtherCAT_master_t *,
|
||||
unsigned short int,
|
||||
unsigned short int,
|
||||
unsigned int *);
|
||||
|
||||
// EtherCAT commands
|
||||
#if 0
|
||||
EtherCAT_command_t *EtherCAT_read(EtherCAT_master_t *,
|
||||
unsigned short,
|
||||
unsigned short,
|
||||
unsigned int);
|
||||
EtherCAT_command_t *EtherCAT_write(EtherCAT_master_t *,
|
||||
unsigned short,
|
||||
unsigned short,
|
||||
unsigned int,
|
||||
const unsigned char *);
|
||||
EtherCAT_command_t *EtherCAT_position_read(EtherCAT_master_t *,
|
||||
short,
|
||||
unsigned short,
|
||||
unsigned int);
|
||||
EtherCAT_command_t *EtherCAT_position_write(EtherCAT_master_t *,
|
||||
short,
|
||||
unsigned short,
|
||||
unsigned int,
|
||||
const unsigned char *);
|
||||
EtherCAT_command_t *EtherCAT_broadcast_read(EtherCAT_master_t *,
|
||||
unsigned short,
|
||||
unsigned int);
|
||||
EtherCAT_command_t *EtherCAT_broadcast_write(EtherCAT_master_t *,
|
||||
unsigned short,
|
||||
unsigned int,
|
||||
const unsigned char *);
|
||||
EtherCAT_command_t *EtherCAT_logical_read_write(EtherCAT_master_t *,
|
||||
unsigned int,
|
||||
unsigned int,
|
||||
unsigned char *);
|
||||
|
||||
void EtherCAT_remove_command(EtherCAT_master_t *, EtherCAT_command_t *);
|
||||
#endif
|
||||
|
||||
// Slave states
|
||||
int EtherCAT_activate_slave(EtherCAT_master_t *, EtherCAT_slave_t *);
|
||||
int EtherCAT_deactivate_slave(EtherCAT_master_t *, EtherCAT_slave_t *);
|
||||
int EtherCAT_activate_all_slaves(EtherCAT_master_t *);
|
||||
int EtherCAT_deactivate_all_slaves(EtherCAT_master_t *);
|
||||
int EtherCAT_state_change(EtherCAT_master_t *, EtherCAT_slave_t *, unsigned char);
|
||||
|
||||
/***************************************************************/
|
||||
// Process data
|
||||
int EtherCAT_write_process_data(EtherCAT_master_t *);
|
||||
int EtherCAT_read_process_data(EtherCAT_master_t *);
|
||||
void EtherCAT_clear_process_data(EtherCAT_master_t *);
|
||||
|
||||
// Private functions
|
||||
#if 0
|
||||
EtherCAT_command_t *alloc_cmd(EtherCAT_master_t *);
|
||||
int add_command(EtherCAT_master_t *, EtherCAT_command_t *);
|
||||
#endif
|
||||
void set_byte(unsigned char *, unsigned int, unsigned char);
|
||||
void set_word(unsigned char *, unsigned int, unsigned int);
|
||||
void output_debug_data(unsigned char *, unsigned int);
|
||||
|
|
|
|||
Loading…
Reference in New Issue