This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
uphp:functions:setusbpower [2017/05/16 06:08] admin created |
uphp:functions:setusbpower [2021/09/13 05:57] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== setusbpower($val) | + | ======setusbpower====== |
- | Switches on or off USB power. | + | |
- | Parameters: | + | < |
+ | |||
+ | Enable or disable USB power | ||
+ | |||
+ | ====Description==== | ||
+ | |||
+ | <well size=" | ||
+ | <span style=" | ||
+ | <span style=" | ||
+ | <span style=" | ||
+ | <span style=" | ||
+ | </ | ||
+ | |||
+ | This function will turn on or off the power for USB. This can be used to reset a USB dongle or just to disable it if required. | ||
+ | |||
+ | ====Parameter==== | ||
+ | |||
+ | < | ||
+ | |||
+ | * **1** - Enable USB power | ||
+ | * **0** - Disable USB power | ||
+ | |||
+ | ====Return Values==== | ||
+ | |||
+ | None | ||
+ | |||
+ | ====Example==== | ||
+ | |||
+ | <code php> | ||
+ | <? | ||
+ | setusbpower(0); | ||
+ | ?> | ||
+ | </ | ||
+ | |||
+ | ====See Also==== | ||
+ | |||
+ | [[get3gstat()]] - Get cellular data connection status information | ||
+ | |||
+ | [[net_disable3g()]] - Disable 3G support for the dongle | ||
+ | |||
+ | [[net_enable3g()]] - Enable 3G support for the dongle | ||
+ | |||
+ | [[getusbstat()]] - Get USB host status information | ||
- | $val - if $val is 1 it will enable usb power. |