Rice Lake iRite IDE User Manual

Page 87

Advertising
background image

920i

Programming Reference - API Reference

83

if dDevice = USBFileSystem then

WriteLn(3,"USBFlashDrive");

elsif dDevice = USBHostPC then

WriteLn(OutPort,"USBHostPC");

elsif dDevice = USBPrinter2 then

WriteLn(OutPort,"USBPrinter2");

elsif dDevice = USBPrinter1 then

WriteLn(OutPort,"USBPrinter1");

elsif dDevice = USBKeyboard then

WriteLn(OutPort,"USBKeyboard");

else

WriteLn(OutPort,"Device Unknown");

end if;

SetUSBAssignment( device : deviceType )

Selects a secondary device for current use, capturing the current device as primary.

Parameters: device (see Section 4.0).

SysCode values returned:

SysOk
SysDeviceNotFound

SysPortBusy

Example:

SetUSBAssignment(USBHostPC);

ReleaseUSBAssignment()

Returns the current USB device to the captured primary device.

SysCode values returned:

SysOk
SysDeviceNotFound

SysPortBusy

Example:

ReleaseUSBAssignment;

IsUSBDevicePresent( device : deviceType )

Checks to see if the device passed is there or not.

Parameters: device (see Section 4.0).

SysCode values returned:

SysOk

SysDeviceNotFound

Example:

Result := IsUSBDevicePresent(USBFileSystem);

if Result <> SysOk then

WriteLn(OutPort,"Flash Drive Not Found");

else

WriteLn(OutPort,"SysOK");

end if;

Advertising
This manual is related to the following products: