Renamed EC_ACK to EC_SLAVE_STATE_ACK_ERR
authorFlorian Pose <fp@igh-essen.com>
Tue, 17 Oct 2006 14:10:29 +0000 (2006-10-17)
changeset 402 03e31ac14047
parent 401 484e248e94de
child 403 7bb931deccd9
Renamed EC_ACK to EC_SLAVE_STATE_ACK_ERR
master/fsm.c
master/slave.h
--- a/master/fsm.c	Tue Oct 17 07:30:01 2006 +0000
+++ b/master/fsm.c	Tue Oct 17 14:10:29 2006 +0000
@@ -1040,7 +1040,7 @@
     }
 
     slave->current_state = EC_READ_U8(datagram->data);
-    if (slave->current_state & EC_ACK) {
+    if (slave->current_state & EC_SLAVE_STATE_ACK_ERR) {
         EC_WARN("Slave %i has state error bit set (0x%02X)!\n",
                 slave->ring_position, slave->current_state);
         slave->current_state &= 0x0F;
@@ -1881,7 +1881,7 @@
         return;
     }
 
-    if (slave->current_state & 0x10) {
+    if (slave->current_state & EC_SLAVE_STATE_ACK_ERR) {
         // state change error
         fsm->change_new = slave->current_state & 0x0F;
         EC_ERR("Failed to set state 0x%02X - Slave %i refused state change"
--- a/master/slave.h	Tue Oct 17 07:30:01 2006 +0000
+++ b/master/slave.h	Tue Oct 17 14:10:29 2006 +0000
@@ -67,8 +67,8 @@
     /**< SAVEOP (mailbox communication and input update) */
     EC_SLAVE_STATE_OP = 0x08,
     /**< OP (mailbox communication and input/output update) */
-    EC_ACK = 0x10
-    /**< Acknoledge bit (no state) */
+    EC_SLAVE_STATE_ACK_ERR = 0x10
+    /**< Acknoledge/Error bit (no actual state) */
 }
 ec_slave_state_t;