Fix building without EoE

Fixes #123
This commit is contained in:
Bjarne von Horn
2024-07-18 14:14:32 +02:00
parent bc945f69ab
commit 4f71ac5099
2 changed files with 7 additions and 2 deletions

View File

@@ -104,7 +104,9 @@ void ec_fsm_master_init(
ec_fsm_coe_init(&fsm->fsm_coe);
ec_fsm_soe_init(&fsm->fsm_soe);
ec_fsm_pdo_init(&fsm->fsm_pdo, &fsm->fsm_coe);
#ifdef EC_EOE
ec_fsm_eoe_init(&fsm->fsm_eoe);
#endif
ec_fsm_change_init(&fsm->fsm_change, fsm->datagram);
ec_fsm_slave_config_init(&fsm->fsm_slave_config, fsm->datagram,
&fsm->fsm_change, &fsm->fsm_coe, &fsm->fsm_soe, &fsm->fsm_pdo,
@@ -126,7 +128,9 @@ void ec_fsm_master_clear(
ec_fsm_coe_clear(&fsm->fsm_coe);
ec_fsm_soe_clear(&fsm->fsm_soe);
ec_fsm_pdo_clear(&fsm->fsm_pdo);
#ifdef EC_EOE
ec_fsm_eoe_clear(&fsm->fsm_eoe);
#endif
ec_fsm_change_clear(&fsm->fsm_change);
ec_fsm_slave_config_clear(&fsm->fsm_slave_config);
ec_fsm_slave_scan_clear(&fsm->fsm_slave_scan);

View File

@@ -965,7 +965,7 @@ void ec_fsm_slave_config_enter_eoe_ip_param(
ec_fsm_slave_config_t *fsm /**< slave state machine */
)
{
#if EC_EOE
#ifdef EC_EOE
ec_slave_t *slave = fsm->slave;
ec_eoe_request_t *request = &slave->config->eoe_ip_param_request;
@@ -991,6 +991,7 @@ void ec_fsm_slave_config_state_eoe_ip_param(
ec_fsm_slave_config_t *fsm /**< slave state machine */
)
{
#ifdef EC_EOE
ec_slave_t *slave = fsm->slave;
if (ec_fsm_eoe_exec(fsm->fsm_eoe, fsm->datagram)) {
@@ -1003,7 +1004,7 @@ void ec_fsm_slave_config_state_eoe_ip_param(
else {
EC_SLAVE_ERR(slave, "Failed to set EoE IP parameters.\n");
}
#endif
ec_fsm_slave_config_enter_pdo_conf(fsm);
}