MERGE branches/async -r243:244 -> trunk (intypes).
This commit is contained in:
parent
62f61a359e
commit
38f5bccbca
|
|
@ -22,11 +22,11 @@
|
|||
*/
|
||||
|
||||
int EtherCAT_rt_canopen_sdo_write(ec_slave_t *slave, /**< EtherCAT-Slave */
|
||||
uint16_t sdo_index, /**< SDO-Index */
|
||||
uint8_t sdo_subindex, /**< SDO-Subindex */
|
||||
uint32_t value, /**< Neuer Wert */
|
||||
size_t size /**< Größe des Datenfeldes */
|
||||
)
|
||||
uint16_t sdo_index, /**< SDO-Index */
|
||||
uint8_t sdo_subindex, /**< SDO-Subindex */
|
||||
uint32_t value, /**< Neuer Wert */
|
||||
size_t size /**< Größe des Datenfeldes */
|
||||
)
|
||||
{
|
||||
uint8_t data[0xF6];
|
||||
ec_command_t command;
|
||||
|
|
@ -115,12 +115,12 @@ int EtherCAT_rt_canopen_sdo_write(ec_slave_t *slave, /**< EtherCAT-Slave */
|
|||
*/
|
||||
|
||||
int EtherCAT_rt_canopen_sdo_read(ec_slave_t *slave, /**< EtherCAT-Slave */
|
||||
uint16_t sdo_index, /**< SDO-Index */
|
||||
uint8_t sdo_subindex, /**< SDO-Subindex */
|
||||
uint32_t *value /**< Speicher für gel. Wert */
|
||||
)
|
||||
uint16_t sdo_index, /**< SDO-Index */
|
||||
uint8_t sdo_subindex, /**< SDO-Subindex */
|
||||
uint32_t *value /**< Speicher für gel. Wert */
|
||||
)
|
||||
{
|
||||
unsigned char data[0xF6];
|
||||
uint8_t data[0xF6];
|
||||
ec_command_t command;
|
||||
ec_master_t *master;
|
||||
cycles_t start, end, timeout;
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ void ec_data_print_diff(const uint8_t *d1, /**< Daten 1 */
|
|||
\return 0 wenn nein, nicht-null wenn ja.
|
||||
*/
|
||||
|
||||
int EtherCAT_dev_is_ec(const ec_device_t *device, /**< EtherCAT-Gerät */
|
||||
inline int EtherCAT_dev_is_ec(const ec_device_t *device, /**< EtherCAT-Gerät */
|
||||
const struct net_device *dev /**< Net-Device */
|
||||
)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -127,7 +127,8 @@ int ec_domain_alloc(ec_domain_t *domain, /**< Dom
|
|||
ec_field_reg_t *field_reg;
|
||||
ec_slave_t *slave;
|
||||
ec_fmmu_t *fmmu;
|
||||
unsigned int i, j, found, data_offset;
|
||||
unsigned int i, j, found;
|
||||
uint32_t data_offset;
|
||||
|
||||
if (domain->data) {
|
||||
EC_ERR("Domain already allocated!\n");
|
||||
|
|
@ -349,8 +350,9 @@ int EtherCAT_rt_register_domain_fields(ec_domain_t *domain,
|
|||
|
||||
void EtherCAT_rt_domain_queue(ec_domain_t *domain /**< Domäne */)
|
||||
{
|
||||
unsigned int offset, i;
|
||||
unsigned int i;
|
||||
size_t size;
|
||||
off_t offset;
|
||||
|
||||
offset = 0;
|
||||
for (i = 0; i < domain->command_count; i++) {
|
||||
|
|
@ -372,9 +374,10 @@ void EtherCAT_rt_domain_queue(ec_domain_t *domain /**< Dom
|
|||
|
||||
void EtherCAT_rt_domain_process(ec_domain_t *domain /**< Domäne */)
|
||||
{
|
||||
unsigned int offset, working_counter_sum, i;
|
||||
unsigned int working_counter_sum, i;
|
||||
ec_command_t *command;
|
||||
size_t size;
|
||||
off_t offset;
|
||||
|
||||
working_counter_sum = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ struct ec_domain
|
|||
unsigned int command_count; /**< Anzahl allozierter Kommandos */
|
||||
ec_domain_mode_t mode;
|
||||
unsigned int timeout_us; /**< Timeout in Mikrosekunden. */
|
||||
unsigned int base_address; /**< Logische Basisaddresse der Domain */
|
||||
uint32_t base_address; /**< Logische Basisaddresse der Domain */
|
||||
unsigned int response_count; /**< Anzahl antwortender Slaves */
|
||||
struct list_head field_regs; /**< Liste der Datenfeldregistrierungen */
|
||||
};
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ int ec_master_bus_scan(ec_master_t *master /**< EtherCAT-Master */)
|
|||
ec_slave_t *slave;
|
||||
ec_slave_ident_t *ident;
|
||||
unsigned int i;
|
||||
unsigned char data[2];
|
||||
uint8_t data[2];
|
||||
|
||||
if (master->slaves || master->slave_count) {
|
||||
EC_ERR("Slave scan already done!\n");
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ void __exit ec_cleanup_module(void);
|
|||
|
||||
int ec_master_count = 1;
|
||||
ec_master_t *ec_masters = NULL;
|
||||
int *ec_masters_reserved = NULL;
|
||||
unsigned int *ec_masters_reserved = NULL;
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
|
@ -88,7 +88,8 @@ int __init ec_init_module(void)
|
|||
}
|
||||
|
||||
if ((ec_masters_reserved =
|
||||
(int *) kmalloc(sizeof(int) * ec_master_count, GFP_KERNEL)) == NULL) {
|
||||
(unsigned int *) kmalloc(sizeof(int) * ec_master_count,
|
||||
GFP_KERNEL)) == NULL) {
|
||||
EC_ERR("Could not allocate memory for reservation flags!\n");
|
||||
kfree(ec_masters);
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -122,15 +122,15 @@ int ec_slave_fetch(ec_slave_t *slave /**< EtherCAT-Slave */)
|
|||
|
||||
int ec_slave_sii_read(ec_slave_t *slave,
|
||||
/**< EtherCAT-Slave */
|
||||
unsigned short int offset,
|
||||
uint16_t offset,
|
||||
/**< Adresse des zu lesenden SII-Registers */
|
||||
unsigned int *target
|
||||
uint32_t *target
|
||||
/**< Zeiger auf einen 4 Byte großen Speicher zum Ablegen
|
||||
der Daten */
|
||||
)
|
||||
{
|
||||
ec_command_t command;
|
||||
unsigned char data[10];
|
||||
uint8_t data[10];
|
||||
cycles_t start, end, timeout;
|
||||
|
||||
// Initiate read operation
|
||||
|
|
@ -194,7 +194,7 @@ void ec_slave_state_ack(ec_slave_t *slave,
|
|||
)
|
||||
{
|
||||
ec_command_t command;
|
||||
unsigned char data[2];
|
||||
uint8_t data[2];
|
||||
cycles_t start, end, timeout;
|
||||
|
||||
EC_WRITE_U16(data, state | EC_ACK);
|
||||
|
|
@ -257,7 +257,7 @@ int ec_slave_state_change(ec_slave_t *slave,
|
|||
)
|
||||
{
|
||||
ec_command_t command;
|
||||
unsigned char data[2];
|
||||
uint8_t data[2];
|
||||
cycles_t start, end, timeout;
|
||||
|
||||
EC_WRITE_U16(data, state);
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ void ec_slave_clear(ec_slave_t *);
|
|||
|
||||
// Slave control
|
||||
int ec_slave_fetch(ec_slave_t *);
|
||||
int ec_slave_sii_read(ec_slave_t *, unsigned short, unsigned int *);
|
||||
int ec_slave_sii_read(ec_slave_t *, uint16_t, uint32_t *);
|
||||
int ec_slave_state_change(ec_slave_t *, uint8_t);
|
||||
int ec_slave_set_fmmu(ec_slave_t *, const ec_domain_t *, const ec_sync_t *);
|
||||
|
||||
|
|
|
|||
|
|
@ -82,8 +82,8 @@ ec_slave_type_t;
|
|||
|
||||
typedef struct slave_ident
|
||||
{
|
||||
unsigned int vendor_id; /**< Hersteller-Code */
|
||||
unsigned int product_code; /**< Herstellerspezifischer Produktcode */
|
||||
uint32_t vendor_id; /**< Hersteller-Code */
|
||||
uint32_t product_code; /**< Herstellerspezifischer Produktcode */
|
||||
const ec_slave_type_t *type; /**< Zeiger auf den entsprechenden Typ */
|
||||
}
|
||||
ec_slave_ident_t;
|
||||
|
|
|
|||
Loading…
Reference in New Issue