usbengines/usbotgwatcher/src/cusbindicatornotifier.cpp
changeset 47 878846f7623e
parent 46 0ffee699d6c7
child 23 bb32eca979b3
equal deleted inserted replaced
46:0ffee699d6c7 47:878846f7623e
   180             break;
   180             break;
   181             }
   181             }
   182         default:
   182         default:
   183             {
   183             {
   184             LOG1("Unknown timer id = %d", aTimerId)
   184             LOG1("Unknown timer id = %d", aTimerId)
   185             Panic(EWrongTimerId);
   185             PANIC(EWrongTimerId);
   186             }
   186             }
   187         }
   187         }
   188     }
   188     }
   189 
   189 
   190 // ---------------------------------------------------------------------------
   190 // ---------------------------------------------------------------------------
   242 // 
   242 // 
   243 // ---------------------------------------------------------------------------
   243 // ---------------------------------------------------------------------------
   244 //  
   244 //  
   245 void CUsbIndicatorNotifier::SetIndicatorL()
   245 void CUsbIndicatorNotifier::SetIndicatorL()
   246     {
   246     {
   247     if (!(iOtgWatcher.IsDeviceA()))
   247     if (!(iOtgWatcher.IsDeviceA()) || iOtgWatcher.CurrentHostState()->Id() == EUsbStateHostAPeripheral)
   248         {
   248         {
   249         // if B, than other party (usbwatcher) takes care of usb indicator
   249         // if B or peripheral, than other party (usbwatcher) takes care of usb indicator
   250         // in combined usbwatcher (if role swap allowed) one class has to manage usb indicator 
   250         // in combined usbwatcher (if role swap allowed) one class has to manage usb indicator 
   251         return;
   251         return;
   252         }
   252         }
   253 
   253 
   254     // if VBus Up and we are host -> show indicator
   254     // if VBus Up and we are host -> show indicator