| Availability | All terminals | ||||
| Description | Returns whether the device is powered by an USB cable. | ||||
| Syntax | int UsbIsPowered( void ); | ||||
| Arguments | None | ||||
| Returns | 
            
  | 
    ||||
| Remarks | Use UsbIsConnected to detect if the port is available for communication. | ||||
| Example | 
#include <stdio.h> #include "lib.h" void main( void ) { SystemSetting("8Z"); // Disable charge indicator for(;;) { if(UsbIsConnected()) GoodReadLed(GREEN, 50); else if(UsbIsPowered()) GoodReadLed(ORANGE, 50); else GoodReadLed(RED, 50); Delay(50); } }  |