Display notLRW flag.
This commit is contained in:
parent
95e6dc8d2b
commit
c26c91c4a0
|
|
@ -150,6 +150,7 @@ int ec_slave_init(ec_slave_t *slave, /**< EtherCAT slave */
|
|||
slave->sii.order = NULL;
|
||||
slave->sii.name = NULL;
|
||||
memset(&slave->sii.coe_details, 0x00, sizeof(ec_sii_coe_details_t));
|
||||
memset(&slave->sii.general_flags, 0x00, sizeof(ec_sii_general_flags_t));
|
||||
slave->sii.current_on_ebus = 0;
|
||||
|
||||
slave->sii.syncs = NULL;
|
||||
|
|
@ -441,6 +442,7 @@ int ec_slave_fetch_sii_general(
|
|||
(data[4] & (0x03 << (i * 2))) >> (i * 2);
|
||||
|
||||
memcpy(&slave->sii.coe_details, data + 5, 1);
|
||||
memcpy(&slave->sii.general_flags, data + 0x000b, 1);
|
||||
slave->sii.current_on_ebus = EC_READ_S16(data + 0x0C);
|
||||
slave->sii.has_general = 1;
|
||||
return 0;
|
||||
|
|
@ -739,6 +741,11 @@ ssize_t ec_slave_info(const ec_slave_t *slave, /**< EtherCAT slave */
|
|||
? "yes" : "no");
|
||||
}
|
||||
|
||||
buf += sprintf(buf, " Flags:\n");
|
||||
buf += sprintf(buf, " Enable SafeOp: %s\n",
|
||||
slave->sii.general_flags.enable_safeop ? "yes" : "no");
|
||||
buf += sprintf(buf, " Enable notLRW: %s\n",
|
||||
slave->sii.general_flags.enable_not_lrw ? "yes" : "no");
|
||||
buf += sprintf(buf, " Current consumption: %i mA\n\n",
|
||||
slave->sii.current_on_ebus);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,19 +103,28 @@ enum {
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
/** Slave information interface CAnopen-over-EtherCAT details flags.
|
||||
/** Slave information interface CANopen-over-EtherCAT details flags.
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t enable_sdo : 1; /**< Enable Sdo access. */
|
||||
uint8_t enable_sdo_info : 1; /**< SDO information service available. */
|
||||
uint8_t enable_pdo_assign : 1; /**< Pdo mapping configurable. */
|
||||
uint8_t enable_pdo_configuration : 1; /**< Pdo configuration possible. */
|
||||
uint8_t enable_upload_at_startup : 1; /**< ? */
|
||||
uint8_t enable_upload_at_startup : 1; /**< ?. */
|
||||
uint8_t enable_sdo_complete_access : 1; /**< Complete access possible. */
|
||||
} ec_sii_coe_details_t;
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/** Slave information interface general flags.
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t enable_safeop : 1; /**< ?. */
|
||||
uint8_t enable_not_lrw : 1; /**< Slave does not support LRW. */
|
||||
} ec_sii_general_flags_t;
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/** Slave information interface data.
|
||||
*/
|
||||
typedef struct {
|
||||
|
|
@ -143,6 +152,7 @@ typedef struct {
|
|||
char *name; /**< slave name acc. to EEPROM */
|
||||
uint8_t physical_layer[4]; /**< port media */
|
||||
ec_sii_coe_details_t coe_details; /**< CoE detail flags. */
|
||||
ec_sii_general_flags_t general_flags; /**< General flags. */
|
||||
int16_t current_on_ebus; /**< power consumption */
|
||||
|
||||
// SyncM
|
||||
|
|
|
|||
Loading…
Reference in New Issue