getusbstat

(FW >= 1.0)

getusbstat - get USB information

Description

array getusbstat()

This will return an array containing information about the USB state

Parameters

none

Return Value

array of data with the following keys:
Key Description
enabled 1 if USB support is enabled, 0 if disabled
state USB state, can be any of the following:
DETACHED - Device is detached
ATTACHED - Device is attached
ADDRESSING - Device is acquiring address
CONFIGURING - Device is being configured
RUNNING - Device is running
HOLDING - Device is holding
STATE=x - Other state (X)
VID USB Device VID
PID USB Device PID
device name of the device, if a driver is found
CDC 1 if the device supports CDC, otherwise 0

Examples

<? 
$arr = getusbstat();
print("USB device ID is: ".$arr['VID'].":".$arr['PID']); ?>