Support of virtual sync managers
authorDominik Staubli <ch1010252@ch10pc423>
Tue, 26 Jan 2010 09:30:35 +0100
changeset 1801 31af610f1639
parent 1799 f228415225b7
child 1802 8876c3d9357d
Support of virtual sync managers
master/sync.c
--- a/master/sync.c	Thu Jan 21 11:10:22 2010 +0100
+++ b/master/sync.c	Tue Jan 26 09:30:35 2010 +0100
@@ -99,8 +99,10 @@
         uint8_t *data /**> Configuration memory. */
         )
 {
-    // enable only if SII enable is set and size is > 0.
-    uint16_t enable = sync->enable && data_size;
+    // enable only if SII enable is set and size is > 0 and SM is not virtual
+    uint16_t enable = (sync->enable & 0x01)
+                        && data_size
+                        && ((sync->enable & 0x04) == 0);
     uint8_t control = sync->control_register;
 
     if (sync_config) {