Fixed compiler error on --disable-eoe.
This commit is contained in:
parent
7be660dced
commit
694838c9f6
|
|
@ -171,7 +171,9 @@ int ec_cdev_ioctl_master(
|
|||
data.slave_count = master->slave_count;
|
||||
data.config_count = ec_master_config_count(master);
|
||||
data.domain_count = ec_master_domain_count(master);
|
||||
#ifdef EC_EOE
|
||||
data.eoe_handler_count = ec_master_eoe_handler_count(master);
|
||||
#endif
|
||||
data.phase = (uint8_t) master->phase;
|
||||
data.scan_busy = master->scan_busy;
|
||||
up(&master->master_sem);
|
||||
|
|
@ -1441,6 +1443,8 @@ int ec_cdev_ioctl_config_sdo(
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
#ifdef EC_EOE
|
||||
|
||||
/** Get EoE handler information.
|
||||
*/
|
||||
int ec_cdev_ioctl_eoe_handler(
|
||||
|
|
@ -1486,6 +1490,8 @@ int ec_cdev_ioctl_eoe_handler(
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/** Request the master from userspace.
|
||||
|
|
@ -3228,8 +3234,10 @@ long eccdev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
return ec_cdev_ioctl_config_pdo_entry(master, arg);
|
||||
case EC_IOCTL_CONFIG_SDO:
|
||||
return ec_cdev_ioctl_config_sdo(master, arg);
|
||||
#ifdef EC_EOE
|
||||
case EC_IOCTL_EOE_HANDLER:
|
||||
return ec_cdev_ioctl_eoe_handler(master, arg);
|
||||
#endif
|
||||
case EC_IOCTL_REQUEST:
|
||||
if (!(filp->f_mode & FMODE_WRITE))
|
||||
return -EPERM;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,9 @@
|
|||
#define EC_IOCTL_CONFIG_PDO EC_IOWR(0x15, ec_ioctl_config_pdo_t)
|
||||
#define EC_IOCTL_CONFIG_PDO_ENTRY EC_IOWR(0x16, ec_ioctl_config_pdo_entry_t)
|
||||
#define EC_IOCTL_CONFIG_SDO EC_IOWR(0x17, ec_ioctl_config_sdo_t)
|
||||
#ifdef EC_EOE
|
||||
#define EC_IOCTL_EOE_HANDLER EC_IOWR(0x18, ec_ioctl_eoe_handler_t)
|
||||
#endif
|
||||
|
||||
// Application interface
|
||||
#define EC_IOCTL_REQUEST EC_IO(0x19)
|
||||
|
|
@ -129,7 +131,9 @@ typedef struct {
|
|||
uint32_t slave_count;
|
||||
uint32_t config_count;
|
||||
uint32_t domain_count;
|
||||
#ifdef EC_EOE
|
||||
uint32_t eoe_handler_count;
|
||||
#endif
|
||||
uint8_t phase;
|
||||
uint8_t scan_busy;
|
||||
struct {
|
||||
|
|
@ -448,6 +452,8 @@ typedef struct {
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
#ifdef EC_EOE
|
||||
|
||||
typedef struct {
|
||||
// input
|
||||
uint16_t eoe_index;
|
||||
|
|
@ -464,6 +470,8 @@ typedef struct {
|
|||
uint32_t tx_queue_size;
|
||||
} ec_ioctl_eoe_handler_t;
|
||||
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
typedef struct {
|
||||
|
|
|
|||
|
|
@ -1386,6 +1386,8 @@ const ec_domain_t *ec_master_find_domain_const(
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
#ifdef EC_EOE
|
||||
|
||||
/** Get the number of EoE handlers.
|
||||
*
|
||||
* \return Number of EoE handlers.
|
||||
|
|
@ -1428,6 +1430,8 @@ const ec_eoe_t *ec_master_get_eoe_handler_const(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/** Set the debug level.
|
||||
|
|
|
|||
|
|
@ -238,8 +238,10 @@ unsigned int ec_master_domain_count(const ec_master_t *);
|
|||
ec_domain_t *ec_master_find_domain(ec_master_t *, unsigned int);
|
||||
const ec_domain_t *ec_master_find_domain_const(const ec_master_t *,
|
||||
unsigned int);
|
||||
#ifdef EC_EOE
|
||||
uint16_t ec_master_eoe_handler_count(const ec_master_t *);
|
||||
const ec_eoe_t *ec_master_get_eoe_handler_const(const ec_master_t *, uint16_t);
|
||||
#endif
|
||||
|
||||
int ec_master_debug_level(ec_master_t *, unsigned int);
|
||||
|
||||
|
|
|
|||
|
|
@ -27,10 +27,12 @@
|
|||
#
|
||||
# ---
|
||||
#
|
||||
# vim: syntax=make
|
||||
# vim: syntax=automake
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
EXTRA_DIST =
|
||||
|
||||
bin_PROGRAMS = ethercat
|
||||
|
||||
ethercat_SOURCES = \
|
||||
|
|
@ -42,7 +44,6 @@ ethercat_SOURCES = \
|
|||
CommandDebug.cpp \
|
||||
CommandDomains.cpp \
|
||||
CommandDownload.cpp \
|
||||
CommandEoe.cpp \
|
||||
CommandFoeRead.cpp \
|
||||
CommandFoeWrite.cpp \
|
||||
CommandGraph.cpp \
|
||||
|
|
@ -65,6 +66,12 @@ ethercat_SOURCES = \
|
|||
main.cpp \
|
||||
sii_crc.cpp
|
||||
|
||||
if ENABLE_EOE
|
||||
ethercat_SOURCES += CommandEoe.cpp
|
||||
else
|
||||
EXTRA_DIST += CommandEoe.cpp
|
||||
endif
|
||||
|
||||
noinst_HEADERS = \
|
||||
Command.h \
|
||||
CommandAlias.h \
|
||||
|
|
@ -74,7 +81,6 @@ noinst_HEADERS = \
|
|||
CommandDebug.h \
|
||||
CommandDomains.h \
|
||||
CommandDownload.h \
|
||||
CommandEoe.h \
|
||||
CommandFoeRead.h \
|
||||
CommandFoeWrite.h \
|
||||
CommandGraph.h \
|
||||
|
|
@ -96,6 +102,12 @@ noinst_HEADERS = \
|
|||
SdoCommand.h \
|
||||
sii_crc.h
|
||||
|
||||
if ENABLE_EOE
|
||||
noinst_HEADERS += CommandEoe.h
|
||||
else
|
||||
EXTRA_DIST += CommandEoe.h
|
||||
endif
|
||||
|
||||
REV = `if test -s $(top_srcdir)/svnrevision; then \
|
||||
cat $(top_srcdir)/svnrevision; \
|
||||
else \
|
||||
|
|
|
|||
|
|
@ -485,6 +485,8 @@ void MasterDevice::requestState(
|
|||
|
||||
/****************************************************************************/
|
||||
|
||||
#ifdef EC_EOE
|
||||
|
||||
void MasterDevice::getEoeHandler(
|
||||
ec_ioctl_eoe_handler_t *eoe,
|
||||
uint16_t eoeHandlerIndex
|
||||
|
|
@ -499,4 +501,6 @@ void MasterDevice::getEoeHandler(
|
|||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
|||
|
|
@ -117,7 +117,9 @@ class MasterDevice
|
|||
void requestState(uint16_t, uint8_t);
|
||||
void readFoe(ec_ioctl_slave_foe_t *);
|
||||
void writeFoe(ec_ioctl_slave_foe_t *);
|
||||
#ifdef EC_EOE
|
||||
void getEoeHandler(ec_ioctl_eoe_handler_t *, uint16_t);
|
||||
#endif
|
||||
|
||||
private:
|
||||
unsigned int index;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,9 @@ using namespace std;
|
|||
#include "CommandDebug.h"
|
||||
#include "CommandDomains.h"
|
||||
#include "CommandDownload.h"
|
||||
#include "CommandEoe.h"
|
||||
#ifdef EC_EOE
|
||||
# include "CommandEoe.h"
|
||||
#endif
|
||||
#include "CommandFoeRead.h"
|
||||
#include "CommandFoeWrite.h"
|
||||
#include "CommandGraph.h"
|
||||
|
|
@ -299,7 +301,9 @@ int main(int argc, char **argv)
|
|||
commandList.push_back(new CommandDebug());
|
||||
commandList.push_back(new CommandDomains());
|
||||
commandList.push_back(new CommandDownload());
|
||||
#ifdef EC_EOE
|
||||
commandList.push_back(new CommandEoe());
|
||||
#endif
|
||||
commandList.push_back(new CommandFoeRead());
|
||||
commandList.push_back(new CommandFoeWrite());
|
||||
commandList.push_back(new CommandGraph());
|
||||
|
|
|
|||
Loading…
Reference in New Issue