Changed VoE mailbox type to 0xff.
authorFlorian Pose <fp@igh-essen.com>
Mon, 22 Sep 2008 14:43:40 +0000
changeset 1216 e70c4d71cebd
parent 1215 3bedd338ff76
child 1217 e8a9785e63c3
Changed VoE mailbox type to 0xff.
master/voe_handler.c
--- a/master/voe_handler.c	Mon Sep 22 11:27:15 2008 +0000
+++ b/master/voe_handler.c	Mon Sep 22 14:43:40 2008 +0000
@@ -44,6 +44,10 @@
 #include "mailbox.h"
 #include "voe_handler.h"
 
+/** VoE mailbox type.
+ */
+#define EC_MBOX_TYPE_VOE 0xff
+
 /** VoE response timeout in [ms].
  */
 #define EC_VOE_RESPONSE_TIMEOUT 500
@@ -169,8 +173,8 @@
         return;
     }
 	
-    if (!(data = ec_slave_mbox_prepare_send(
-                    slave, &voe->datagram, 0x01, voe->data_size))) {
+    if (!(data = ec_slave_mbox_prepare_send(slave, &voe->datagram,
+                    EC_MBOX_TYPE_VOE, voe->data_size))) {
         voe->state = ec_voe_handler_state_error;
         voe->request_state = EC_INT_REQUEST_FAILURE;
         return;
@@ -341,7 +345,7 @@
         return;
     }
 
-    if (mbox_prot != 0x01) { // VoE
+    if (mbox_prot != EC_MBOX_TYPE_VOE) {
         voe->state = ec_voe_handler_state_error;
         voe->request_state = EC_INT_REQUEST_FAILURE;
         EC_WARN("Received mailbox protocol 0x%02X as response.\n", mbox_prot);