usbengines/usbotgwatcher/src/cusbindicatornotifier.cpp
branchRCL_3
changeset 7 ff9df6630274
parent 6 a15c582fbf97
child 8 bb32eca979b3
equal deleted inserted replaced
6:a15c582fbf97 7:ff9df6630274
   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