master/sync.c
changeset 1802 8876c3d9357d
parent 1801 31af610f1639
child 1921 d9cf40facbc4
equal deleted inserted replaced
1800:5bfbb7be5400 1802:8876c3d9357d
    97         uint16_t data_size, /**< Data size. */
    97         uint16_t data_size, /**< Data size. */
    98         const ec_sync_config_t *sync_config, /**< Configuration. */
    98         const ec_sync_config_t *sync_config, /**< Configuration. */
    99         uint8_t *data /**> Configuration memory. */
    99         uint8_t *data /**> Configuration memory. */
   100         )
   100         )
   101 {
   101 {
   102     // enable only if SII enable is set and size is > 0.
   102     // enable only if SII enable is set and size is > 0 and SM is not virtual
   103     uint16_t enable = sync->enable && data_size;
   103     uint16_t enable = (sync->enable & 0x01)
       
   104                         && data_size
       
   105                         && ((sync->enable & 0x04) == 0);
   104     uint8_t control = sync->control_register;
   106     uint8_t control = sync->control_register;
   105 
   107 
   106     if (sync_config) {
   108     if (sync_config) {
   107 
   109 
   108         switch (sync_config->dir) {
   110         switch (sync_config->dir) {